gethostbyaddr gethostbyname gethostname getmntent \
                gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
                realpath rmdir select socket strcasecmp strchr strdup \
-               strerror strrchr strtol strtoul])
+               strerror strrchr strtol strtoul sigprocmask])
 
 
 dnl *************************************************************
 
  * Ported to Linux by Olaf Kirch <okir@monad.swb.de>
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
        int pid;                /* process id */
        int delay;              /* msecs since last checked current time */
        int randnum;            /* a random number */
+#if HAVE_SIGPROCMASK
+       sigset_t oldmask;       /* saved signal mask */
+#else
        int oldmask;            /* saved signal mask */
+#endif
        int sampletime;         /* secs between reading kernel stats */
        char *opts;             /* option parsing */
        int pct;
 
        (void) signal(SIGINT, cleanup);
        (void) signal(SIGUSR1, startup);
+#if HAVE_SIGPROCMASK
+       {
+               sigset_t mask;
+               sigemptyset(&mask);
+               sigaddset(&mask, SIGUSR1);
+               sigprocmask(SIG_BLOCK, &mask, &oldmask);
+       }
+#else
+       /*
+        * sigblock() is marked deprecated in modern
+        * glibc and hence generates a warning.
+        */
        oldmask = sigblock(sigmask(SIGUSR1));
+#endif
 
        if (ncalls == 0) {
                if (runtime == 0) {
                exit(1);
        }
 
+#if HAVE_SIGPROCMASK
+       sigsuspend(&oldmask);
+#else
        sigpause(oldmask);
+#endif
 
        /*
         * Initialize counters