Search code examples
androidvlcvlc-android

implict declaration of function - vlc android


i want to compile the android version of vlc player but in progress i have two error as follow :

../../src/misc/block.c:315:5: error: implicit declaration of function 'shmdt' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

../../src/posix/filesystem.c:258:16: error: implicit declaration of function 'sigtimedwait' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

i searched many posts here or in another forums for implicit problem and they say it's because not importing lib / header file.

shmdt want shm.h and it is in block.c file correctly. and sigtimedwait have its own header.

i have this problem about two days and change many lines of code.
how can i fix this ? any idea ?


Solution

  • The compiler wants to know the function before it can use it just declare the function before you call it You can add definition of method sigtimedwait in file filesystem.c.

    That means add following:

    int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout);

    See https://linux.die.net/man/2/sigtimedwait