]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: include <signal.h> in Preforker.h 36181/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 18 Jul 2020 23:39:30 +0000 (23:39 +0000)
committerNathan Cutler <ncutler@suse.com>
Sun, 9 Aug 2020 20:41:32 +0000 (22:41 +0200)
Since it does use functions declared by signal.h

/home/jenkins/workspace/ceph-master/src/common/Preforker.h:50:5: error: use of undeclared identifier                                             'sigemptyset'
    sigemptyset(&sa.sa_mask);
    ^
/home/jenkins/workspace/ceph-master/src/common/Preforker.h:52:9: error: no matching constructor for                                             initialization of 'sigaction'
    if (sigaction(SIGHUP, &sa, nullptr) != 0) {
        ^         ~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit copy constructor) not via                                            ble: requires 1 argument, but 3 were provided
struct sigaction {
       ^
/usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit move constructor) not via                                            ble: requires 1 argument, but 3 were provided
/usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit default constructor) not                                             viable: requires 0 arguments, but 3 were provided
2 errors generated.

fixes: https://github.com/ceph/ceph/pull/35844
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
(cherry picked from commit 93e2ad69815af0d54a11a13939d57541d74eeb8e)

src/common/Preforker.h

index b922f4656127f34078d7965aa622ed548e084a56..e92b2a440a2073c816eff2c31923357ae488d714 100644 (file)
@@ -3,6 +3,7 @@
 #ifndef CEPH_COMMON_PREFORKER_H
 #define CEPH_COMMON_PREFORKER_H
 
+#include <signal.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
 #include <unistd.h>