[asterisk-bugs] [JIRA] (ASTERISK-26255) Fix includes of sys/signal.h

Seamus Caveney (JIRA) noreply at issues.asterisk.org
Mon Aug 1 19:53:56 CDT 2016


Seamus Caveney created ASTERISK-26255:
-----------------------------------------

             Summary: Fix includes of sys/signal.h
                 Key: ASTERISK-26255
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26255
             Project: Asterisk
          Issue Type: Improvement
      Security Level: None
          Components: Core/Portability
    Affects Versions: 14.0.0-beta1, 13.10.0
         Environment: musl libc 1.1.14, gcc 5.3, x86_64
            Reporter: Seamus Caveney
            Severity: Trivial


Numerous files include <sys/signal.h> incorrectly, the proper include across all platforms should just be <signal.h>. Modern revisions of glibc silently redirect <sys/signal.h> to <signal.h>, while musl does output a warning:

#warning redirecting incorrect #include <sys/signal.h> to <signal.h>

The patch replaces all occurrences of <sys/signal.h> with <signal.h>. Additionally there were a few locations with preprocessor checks that were made redundant:

- apps/app_dahdiras.c - removed __linux__ check
- channels/chan_dahdi.c - removed __NetBSD__ || __FreeBSD__ check
- pbx/pbx_dundi.c - moved signal.h and ifaddrs.h includes outside of BSD/OSX as they are not platform specific

If the ifaddrs.h related modification should be split into another issue ticket, please let me know.

I will be submitting the patch to Gerrit momentarily 



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list