diff --git a/compat.h b/compat.h index c936b68d..40aeca63 100644 --- a/compat.h +++ b/compat.h @@ -1,4 +1,4 @@ -/* $Id: compat.h,v 1.28 2010-10-27 21:33:15 nicm Exp $ */ +/* $Id: compat.h,v 1.29 2010-10-27 21:34:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -16,6 +16,9 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef COMPAT_H +#define COMPAT_H + #ifndef __GNUC__ #define __attribute__(a) #endif @@ -60,10 +63,6 @@ typedef uint64_t u_int64_t; #include "compat/bitstring.h" #endif -#ifdef HAVE_GETOPT -#include -#endif - #ifdef HAVE_CRYPT_H #include #endif @@ -227,7 +226,9 @@ int setenv(const char *, const char *, int); int unsetenv(const char *); #endif -#ifndef HAVE_GETOPT +#ifdef HAVE_GETOPT +#include +#else /* getopt.c */ extern int BSDopterr; extern int BSDoptind; @@ -242,3 +243,5 @@ int BSDgetopt(int, char *const *, const char *); #define optreset BSDoptreset #define optarg BSDoptarg #endif + +#endif /* COMPAT_H */