Be explicit when we exit
[nbd.git] / cliserv.h
index 5685528..77310c3 100644 (file)
--- a/cliserv.h
+++ b/cliserv.h
@@ -42,8 +42,13 @@ typedef unsigned long long u64;
 #include "nbd.h"
 #endif
 #ifdef NBD_H_LINUX
-#include <linux/types.h>
-#include <linux/nbd.h>
+# ifdef HAVE_LINUX_TYPES_H
+#  include <linux/types.h>
+# else
+#  define __be32 u32
+#  define __be64 u64
+# endif
+# include <linux/nbd.h>
 #endif
 
 #if NBD_LFS==1
@@ -106,8 +111,9 @@ void err(const char *s) {
        s1[maxlen-1] = '\0';
 #ifdef ISSERVER
        syslog(LOG_ERR, "%s", s1);
+       syslog(LOG_ERR, "Exiting.");
 #endif
-       fprintf(stderr, "Error: %s\n", s1);
+       fprintf(stderr, "Error: %s\nExiting.\n", s1);
        exit(1);
 }