From 21fc2b40e69655cb4d71af21509088e99caafeb0 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 14 Sep 2022 23:11:10 +0300 Subject: [PATCH] include reordering for XMP_AMIGA. add missing guards to unistd.h. --- src/commands.c | 11 ++++++++--- src/options.c | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/commands.c b/src/commands.c index b875c9c..a1caae2 100644 --- a/src/commands.c +++ b/src/commands.c @@ -6,10 +6,13 @@ * file for more information. */ -#include +#include +#include "common.h" + #if defined(_WIN32) || defined(__OS2__) || defined(__DJGPP__) || defined(_DOS) #include #endif + #if defined(XMP_AMIGA) #ifdef __amigaos4__ #define __USE_INLINE__ @@ -17,8 +20,10 @@ #include #include #endif -#include -#include "common.h" + +#ifdef HAVE_UNISTD_H +#include +#endif #ifdef __CYGWIN__ #include diff --git a/src/options.c b/src/options.c index 96154b4..5b920f0 100644 --- a/src/options.c +++ b/src/options.c @@ -13,12 +13,16 @@ #include #endif #include +#ifdef HAVE_UNISTD_H #include +#endif + #if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) #include #else #include "getopt_long.h" #endif + #include #include "common.h"