diff --git a/lib/sg_pt_linux.c b/lib/sg_pt_linux.c index 76773fa..914570b 100644 --- a/lib/sg_pt_linux.c +++ b/lib/sg_pt_linux.c @@ -18,8 +18,11 @@ #include #include #include -#include #include +#include /* to define 'major' */ +#ifndef major +#include +#endif #ifdef HAVE_CONFIG_H diff --git a/src/sg_dd.c b/src/sg_dd.c index 97a6f77..7bb5eed 100644 --- a/src/sg_dd.c +++ b/src/sg_dd.c @@ -44,13 +44,15 @@ #define __STDC_FORMAT_MACROS 1 #include #include -#include #include -#include #include #include -#include +#include +#ifndef major +#include +#endif #include /* */ +#include #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/src/sg_map26.c b/src/sg_map26.c index 7739592..8e583d2 100644 --- a/src/sg_map26.c +++ b/src/sg_map26.c @@ -33,8 +33,11 @@ #include #include #include -#include #include +#include /* new location for major + minor */ +#ifndef major +#include +#endif #include #ifdef HAVE_CONFIG_H diff --git a/src/sg_read.c b/src/sg_read.c index 2cf8212..1eb0411 100644 --- a/src/sg_read.c +++ b/src/sg_read.c @@ -36,9 +36,11 @@ #define __STDC_FORMAT_MACROS 1 #include #include -#include #include #include +#ifndef major +#include +#endif #include #include #include diff --git a/src/sg_xcopy.c b/src/sg_xcopy.c index 11206ac..49b4341 100644 --- a/src/sg_xcopy.c +++ b/src/sg_xcopy.c @@ -47,11 +47,13 @@ #define __STDC_FORMAT_MACROS 1 #include #include -#include #include -#include #include #include +#include +#ifndef major +#include +#endif #include #include /* */ diff --git a/src/sgm_dd.c b/src/sgm_dd.c index 4e40acc..edf4861 100644 --- a/src/sgm_dd.c +++ b/src/sgm_dd.c @@ -48,11 +48,13 @@ #define __STDC_FORMAT_MACROS 1 #include #include -#include #include -#include -#include #include +#include +#include +#ifndef major +#include +#endif #include #include /* */ diff --git a/src/sgp_dd.c b/src/sgp_dd.c index 1ebecca..be9547b 100644 --- a/src/sgp_dd.c +++ b/src/sgp_dd.c @@ -43,9 +43,11 @@ #define __STDC_FORMAT_MACROS 1 #include #include -#include #include #include +#ifndef major +#include +#endif #include #include #include /* */