aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-11 20:14:09 +0200
committerMattias Andrée <maandree@kth.se>2020-06-11 20:14:09 +0200
commitb56c78b9251806c5e5cd3a5fa5d1f6e8e3de351b (patch)
treeaa502d70d9969c333ccf9e70d55fd6dea41623c2 /common.h
parentFix error checking (diff)
downloadlibaxl-b56c78b9251806c5e5cd3a5fa5d1f6e8e3de351b.tar.gz
libaxl-b56c78b9251806c5e5cd3a5fa5d1f6e8e3de351b.tar.bz2
libaxl-b56c78b9251806c5e5cd3a5fa5d1f6e8e3de351b.tar.xz
Misc, mainly connect stuff
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/common.h b/common.h
index c54d000..ee68661 100644
--- a/common.h
+++ b/common.h
@@ -2,8 +2,10 @@
#include "libaxl.h"
#include <arpa/inet.h>
+#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/un.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -12,6 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <unistd.h>
#if defined(__linux__)
@@ -21,10 +24,14 @@
#if !defined(NO_LIBERROR)
# include <liberror.h>
#else
+struct liberror_state {int err;};
+# define liberror_start(STATEP) ((STATEP)->err = errno)
+# define liberror_end(STATEP) (errno = (STATEP)->err)
# define liberror_save_backtrace(...) ((void) 0)
# define liberror_set_error(...) ((void) 0)
# define liberror_set_error_errno(...) ((void) 0)
# define liberror_reset_error() ((void) 0)
+# define liberror_pop_error() ((void) 0)
#endif
#if !defined(NO_LIBERROR) && !defined(NO_LIBERROR_LIBC)