lib: Do not assume sig_atomic_t is int.
authorEd Maste <emaste@freebsd.org>
Tue, 26 Jun 2012 14:43:54 +0000 (14:43 +0000)
committerBen Pfaff <blp@nicira.com>
Tue, 26 Jun 2012 16:33:43 +0000 (09:33 -0700)
On FreeBSD sig_atomic_t is long, which causes the comparison in
fatal_signal_run to be true when no signal has been reported.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
lib/fatal-signal.c

diff --git a/AUTHORS b/AUTHORS
index ddb3b13..5893ef3 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -16,6 +16,7 @@ Dan Wendlandt           dan@nicira.com
 Daniel Roman            droman@nicira.com
 David Erickson          derickso@stanford.edu
 Dominic Curran          dominic.curran@citrix.com
+Ed Maste                emaste at freebsd.org
 Edward Tomasz NapieraƂa trasz@freebsd.org
 Ethan Jackson           ethan@nicira.com
 Gaetano Catalli         gaetano.catalli@gmail.com
index a6ce1b7..ddc43e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -152,7 +152,7 @@ fatal_signal_handler(int sig_nr)
 void
 fatal_signal_run(void)
 {
-    int sig_nr;
+    sig_atomic_t sig_nr;
 
     fatal_signal_init();