From 9f5ebd9bf3baab867391f2a4803bea0c2b22c2d9 Mon Sep 17 00:00:00 2001 From: Ralph Date: Thu, 19 Mar 2015 08:36:27 +0800 Subject: io: fix Linux include and UNIX_PATH_MAX fallback This makes it easier to compile against other C libraries than glibc. --- lem/io/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lem/io/core.c b/lem/io/core.c index 9c8dfc2..1ec3843 100644 --- a/lem/io/core.c +++ b/lem/io/core.c @@ -37,14 +37,15 @@ #include #include extern char **environ; -#ifndef UNIX_PATH_MAX -#define UNIX_PATH_MAX 104 -#endif #else -#include +#include #include #endif +#ifndef UNIX_PATH_MAX +#define UNIX_PATH_MAX (sizeof ((struct sockaddr_un *)0)->sun_path) +#endif + #include static int -- cgit v1.2.1