]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix build on cygwin
authorDaniel Veillard <veillard@redhat.com>
Tue, 8 Mar 2011 08:01:25 +0000 (16:01 +0800)
committerDaniel Veillard <veillard@redhat.com>
Tue, 8 Mar 2011 08:01:25 +0000 (16:01 +0800)
Apparently some signals found on Unix are not exposed, this led
to a compilation failure
* src/util/logging.c: make code related to each signal dependant
  upon the definition of that signal

src/util/logging.c

index 956e046a7d949c44eabbbda296ddbde76b9b8ec6..64903765f6b2622f3acf5640758350ff25a21a3d 100644 (file)
@@ -316,24 +316,36 @@ virLogEmergencyDumpAll(int signum) {
 
     virLogLock();
     switch (signum) {
+#ifdef SIGFPE
         case SIGFPE:
             virLogDumpAllFD( "Caught signal Floating-point exception", -1);
             break;
+#endif
+#ifdef SIGSEGV
         case SIGSEGV:
             virLogDumpAllFD( "Caught Segmentation violation", -1);
             break;
+#endif
+#ifdef SIGILL
         case SIGILL:
             virLogDumpAllFD( "Caught illegal instruction", -1);
             break;
+#endif
+#ifdef SIGABRT
         case SIGABRT:
             virLogDumpAllFD( "Caught abort signal", -1);
             break;
+#endif
+#ifdef SIGBUS
         case SIGBUS:
             virLogDumpAllFD( "Caught bus error", -1);
             break;
+#endif
+#ifdef SIGUSR2
         case SIGUSR2:
             virLogDumpAllFD( "Caught User-defined signal 2", -1);
             break;
+#endif
         default:
             virLogDumpAllFD( "Caught unexpected signal", -1);
             break;