diff options
| author | Amarnath Hullur Subramanyam <amarnath@codeaurora.org> | 2016-03-24 15:27:40 -0700 |
|---|---|---|
| committer | Amarnath Hullur Subramanyam <amarnath@codeaurora.org> | 2016-03-24 16:05:19 -0700 |
| commit | 510ef590c404bce9eb30112db584f13f71cfbac0 (patch) | |
| tree | c405f39cbefb79c231a73583e1efb1ede33d8b20 /src | |
| parent | 6ddb4753ddada89607db9f4c9fdd9629744d07e0 (diff) | |
| download | android_external_wpa_supplicant_8-510ef590c404bce9eb30112db584f13f71cfbac0.tar.gz android_external_wpa_supplicant_8-510ef590c404bce9eb30112db584f13f71cfbac0.tar.bz2 android_external_wpa_supplicant_8-510ef590c404bce9eb30112db584f13f71cfbac0.zip | |
eap_proxy: Add gettid syscall wrapper
gettid system calls doesn't have a wrapper in glibc. Bionic library
provides wrapper so there is no issue in Android platform however
non-Android platform throws linker error. This commit addresses this
by implementing a wrapper of gettid.
Change-Id: I996d8aa8ed21fabbefa9190c1132362e7b92e877
CRs-Fixed: 994742
Diffstat (limited to 'src')
| -rw-r--r-- | src/eap_peer/eap_proxy_qmi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/eap_peer/eap_proxy_qmi.c b/src/eap_peer/eap_proxy_qmi.c index f8c9cbda..f0442d39 100644 --- a/src/eap_peer/eap_proxy_qmi.c +++ b/src/eap_peer/eap_proxy_qmi.c @@ -49,6 +49,8 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #endif #include <pthread.h> +#include <sys/syscall.h> +#include <sys/types.h> #define IMSI_LENGTH 15 #define WPA_UIM_QMI_EVENT_MASK_CARD_STATUS \ @@ -81,6 +83,21 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define EAP_PROXY_TARGET_FUSION4_5_PCIE "fusion4_5_pcie" #define EAP_PROXY_BASEBAND_VALUE_UNDEFINED "undefined" +#ifndef ANDROID +#ifdef SYS_gettid +static inline pid_t gettid(void) +{ + return syscall(SYS_gettid); +} +#else +static inline pid_t gettid(void) +{ + return -1; +} +#endif +#endif + + static void eap_proxy_eapol_sm_set_bool(struct eap_proxy_sm *sm, enum eapol_bool_var var, Boolean value); static Boolean eap_proxy_eapol_sm_get_bool(struct eap_proxy_sm *sm, |
