[OpenSIPS-Devel] [OpenSIPS/opensips] 4d61b9: Fix compilation warnings with -DUSE_FUTEX

Liviu Chircu noreply at github.com
Mon Apr 13 08:59:33 EST 2020

  Branch: refs/heads/3.0
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 4d61b934d54c4b56144ede65a16a385c2d6e2e2d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-04-13 (Mon, 13 Apr 2020)

  Changed paths:
    M modules/identity/identity.c
    M modules/presence_dialoginfo/pidf.c
    M modules/presence_xml/pidf.c

  Log Message:
  Fix compilation warnings with -DUSE_FUTEX

It seems that whenever "time.h" is included without first enabling
_GNU_SOURCE, including "unistd.h" afterwards will leave the "syscall"
function undeclared, regardless whether _GNU_SOURCE is defined or not.

../../parser/../mem/../futex_lock.h: In function ‘get_lock’:
../../parser/../mem/../futex_lock.h:78:31: warning: implicit declaration
of function ‘syscall’; did you mean ‘sysconf’?
 #define futex_wait(lock, val) syscall(SYS_futex, lock, FUTEX_WAIT, val,
 0, 0, 0)
../../parser/../mem/../futex_lock.h:268:4: note: in expansion of macro
    futex_wait(lock, 2);

(cherry picked from commit fa4e4fa70085db9da4dc72f856e0648341b0f5a6)

More information about the Devel mailing list