diff --git a/aucat/aucat.c b/aucat/aucat.c index d021a1d..b157945 100644 --- a/aucat/aucat.c +++ b/aucat/aucat.c @@ -14,9 +14,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef COMPAT_STRTONUM -#include "bsd-compat.h" -#endif #include #include #include @@ -47,6 +44,9 @@ #ifdef DEBUG #include "dbg.h" #endif +#ifdef COMPAT_STRTONUM +#include "bsd-compat.h" +#endif /* * unprivileged user name diff --git a/bsd-compat/bsd-compat.h b/bsd-compat/bsd-compat.h index d2282a5..9883bc8 100644 --- a/bsd-compat/bsd-compat.h +++ b/bsd-compat/bsd-compat.h @@ -1,4 +1,4 @@ -#ifdef COMPAT_PACKED +#ifndef __packed #define __packed __attribute__((packed)) #endif @@ -6,29 +6,19 @@ #include #include #if __BYTE_ORDER == __LITTLE_ENDIAN -#define letoh16(x) (x) -#define letoh32(x) (x) #define htole16(x) (x) #define htole32(x) (x) -#define ntohl(x) bswap_32(x) +#define letoh16(x) (x) +#define letoh32(x) (x) #else -#define letoh16(x) bswap_16(x) -#define letoh32(x) bswap_32(x) #define htole16(x) bswap_16(x) #define htole32(x) bswap_32(x) -#define ntohl(x) (x) +#define letoh16(x) bswap_16(x) +#define letoh32(x) bswap_32(x) #endif #endif -/* - * setgroups(2) is defined here, on linux - */ -#include -#include - -/* - * prototypes of these don't hurt - */ -long long strtonum(const char *, long long, long long, const char **); -size_t strlcpy(char *, const char *, size_t); int issetugid(void); +size_t strlcpy(char *, const char *, size_t); +size_t strlcat(char *, const char *, size_t); +long long strtonum(const char *, long long, long long, const char **);