Add fallback definition of SIG_ATOMIC_MAX
authorSimon Horman <horms@verge.net.au>
Thu, 22 Sep 2011 12:24:12 +0000 (21:24 +0900)
committerBen Pfaff <blp@nicira.com>
Thu, 22 Sep 2011 16:02:59 +0000 (09:02 -0700)
Android appears to lack SIG_ATOMIC_MAX which is only
used in fatal-signal.c.

Observed when compiling using the Android NDK r6b (Android API level 13).

Patch based on a suggestion by Ben Pfaff

lib/fatal-signal.c

index c7e87dbe9fbca7bfb976f0bc921620efcaf508c5..a6ce1b78c9a3eb949851c7f6cf9404a8bcbcf873 100644 (file)
 #include "util.h"
 #include "vlog.h"
 
+#include "type-props.h"
+
+#ifndef SIG_ATOMIC_MAX
+#define SIG_ATOMIC_MAX TYPE_MAXIMUM(sig_atomic_t)
+#endif
+
 VLOG_DEFINE_THIS_MODULE(fatal_signal);
 
 /* Signals to catch. */