# wpa_supplicant compilation issue



## deb (May 23, 2011)

Hi,

I am trying to compile wpa_supplicant with some additional CFLAGS. When I am using -DSSL CFLAG option compilation is not successful.

If I am not adding this -DSSL option in CFLAGS then it is successful. Can you please tell me what is the reason. I did not find this SSL option anywhere in the wpa_supplicant source code. Please help.

Below the error list I am getting.  


```
CC  config.c
  CC  notify.c
  CC  bss.c
  CC  eap_register.c
  CC  ../src/utils/common.c
  CC  ../src/utils/wpa_debug.c
  CC  ../src/utils/wpabuf.c
  CC  ../src/utils/os_unix.c
  CC  ../src/utils/eloop.c
  CC  config_file.c
  CC  ../src/rsn_supp/wpa.c
  CC  ../src/rsn_supp/preauth.c
  CC  ../src/rsn_supp/pmksa_cache.c
  CC  ../src/rsn_supp/peerkey.c
  CC  ../src/rsn_supp/wpa_ie.c
  CC  ../src/common/wpa_common.c
  CC  ../src/eap_peer/eap_tls.c
  CC  ../src/eapol_supp/eapol_supp_sm.c
  CC  ../src/eap_peer/eap.c
  CC  ../src/eap_peer/eap_methods.c
  CC  ../src/eap_peer/eap_tls_common.c
In file included from /root/deb/openssl-1.0.0d/OPSSL/include/openssl/crypto.h:132,
                 from /root/deb/openssl-1.0.0d/OPSSL/include/openssl/comp.h:6,
                 from /root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:150,
                 from ../src/crypto/tls_openssl.c:24:
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ossl_typ.h:170: error: expected identifier or â€˜(â€™ before numeric constant
In file included from ../src/crypto/tls_openssl.c:24:
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:382: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:383: error: expected declaration specifiers or â€˜...â€™ before numeric constant
In file included from ../src/crypto/tls_openssl.c:24:
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:389: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:390: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:391: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:392: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:393: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:394: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:395: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:396: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:397: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:398: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:399: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:400: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:402: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:404: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:405: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:406: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:410: warning: type defaults to â€˜intâ€™ in declaration of â€˜type nameâ€™
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:410: error: expected â€˜;â€™, â€˜,â€™ or â€˜)â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:411: error: expected â€˜;â€™ before â€˜intâ€™
In file included from ../src/crypto/tls_openssl.c:24:
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:640: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:641: error: expected declaration specifiers or â€˜...â€™ before numeric constant
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:641: error: expected declaration specifiers or â€˜...â€™ before numeric constant
In file included from ../src/crypto/tls_openssl.c:24:
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:668: warning: type defaults to â€˜intâ€™ in declaration of â€˜type nameâ€™
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:668: error: expected â€˜;â€™, â€˜,â€™ or â€˜)â€™ before numeric constant
In file included from ../src/crypto/tls_openssl.c:24:
/root/deb/openssl-1.0.0d/OPSSL/include/openssl/ssl.h:761: error: expected declaration
```


----------



## SirDice (May 23, 2011)

Stop using CFLAGS. And you don't need to compile wpa_supplicant, it's part of the base OS. See wpa_supplicant(8).


----------



## deb (May 23, 2011)

Hi, thanks for your answer. I have to use -DSSL CFLAG and I am not using wpa_supplicant of the base OS. I am downloading source code for wpa_supplicant version 0.7.3 and trying to compile with openssl-1.0.0d (this is our requirement).

Can you help me to figure out this error?


----------



## kpedersen (May 23, 2011)

The wpa_supplicant source code will probably need loads of patches, so instead use the version of the source provided in /usr/src in the FreeBSD source tree.

Though I am not sure why the one in base will not suffice.


----------

