I have to include a static native library (dsplink.a) which uses System V IPCs in android ndk project.
Including my library in android.mk as,
LOCAL_LDLIBS := ($MY-PATH)/dsplink.a
gives the following error:
_sync_usr.c:(.text+0x24b4): undefined reference to `semget'
_sync_usr.c:(.text+0x24d4): undefined reference to `__errno_location'
_sync_usr.c:(.text+0x24f4): undefined reference to `semget'
_sync_usr.c:(.text+0x2538): undefined reference to `semctl'
semctl,semget,.. functions are included from sys/sem.h.
Is there any way to include the library ?
Sadly it isn’t possible.
Extraction from android-ndk-r8/docs/system/libc/SYSV-IPC.html
Android does not support System V IPCs, i.e. the facilities provided by the
following standard Posix headers:
The reason for this is due to the fact that, by design, they lead to global
kernel resource leakage.