https://bugs.kde.org/show_bug.cgi?id=473604

            Bug ID: 473604
           Summary: Fix bug472219.c compile failure with Clang 16
    Classification: Developer tools
           Product: valgrind
           Version: 3.22 GIT
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: fanqu...@gmail.com
  Target Milestone: ---

Created attachment 161091
  --> https://bugs.kde.org/attachment.cgi?id=161091&action=edit
memcheck-fix-bug472219.c-compile-failure-under-Clang.patch

Compiling memcheck/tests/bug472219.c under clang (16.0.0) currently fails with:

bug472219.c:14:4: error: call to undeclared function 'ppoll'; ISO C99 and later
do not support implicit function declarations [-Wimplicit-function-declaration]
   ppoll(fds, 2, &timeout, NULL);
   ^
bug472219.c:14:4: note: did you mean 'poll'?
/usr/include/x86_64-linux-gnu/sys/poll.h:54:12: clang -Winline -Wall -Wshadow
-Wno-long-long -g -fno-stack-protector  -Wno-format-extra-args
-Wno-literal-range -Wno-tautological-constant-out-of-range-compare
-Wno-self-assign -Wno-string-plus-int -Wno-uninitialized -Wno-unused-value 
-m64    -o err_disable2 err_disable2.o  
note: 'poll' declared here
extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
           ^
1 error generated.

Adding the missing _GNU_SOURCE define (patch attached) fixes the issue.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to