[OpenSIPS-Devel] [OpenSIPS/opensips] 2ee910: Fix compilation warnings with -DUSE_FUTEX

Liviu Chircu noreply at github.com
Mon Apr 13 09:00:29 EST 2020


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2ee910093066f9578da6583727ad49ee0aef19f4
      https://github.com/OpenSIPS/opensips/commit/2ee910093066f9578da6583727ad49ee0aef19f4
  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’?
[-Wimplicit-function-declaration]
 #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’
    futex_wait(lock, 2);
    ^~~~~~~~~~

(cherry picked from commit fa4e4fa70085db9da4dc72f856e0648341b0f5a6)





More information about the Devel mailing list