|
| 1 | +diff --git a/create.cc b/create.cc |
| 2 | +index 11c4041..fcfcc41 100644 |
| 3 | +--- a/create.cc |
| 4 | ++++ b/create.cc |
| 5 | +@@ -27,6 +27,11 @@ |
| 6 | + !defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__ |
| 7 | + #include <sys/sysmacros.h> // for major, minor |
| 8 | + #endif |
| 9 | ++#if !defined(HAVE_MAJOR) && !defined(major) |
| 10 | ++/* Replacement for major/minor/makedev. */ |
| 11 | ++#define major(x) ((int)(0x00ff & ((x) >> 8))) |
| 12 | ++#define minor(x) ((int)(0xffff00ff & (x))) |
| 13 | ++#endif |
| 14 | + #include <ftw.h> |
| 15 | + #include <grp.h> |
| 16 | + #include <pwd.h> |
| 17 | +diff --git a/decode.cc b/decode.cc |
| 18 | +index 1742df2..31abc3f 100644 |
| 19 | +--- a/decode.cc |
| 20 | ++++ b/decode.cc |
| 21 | +@@ -30,6 +30,12 @@ |
| 22 | + !defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__ |
| 23 | + #include <sys/sysmacros.h> // for major, minor, makedev |
| 24 | + #endif |
| 25 | ++#if !defined(HAVE_MAJOR) && !defined(major) |
| 26 | ++/* Replacement for major/minor/makedev. */ |
| 27 | ++#define major(x) ((int)(0x00ff & ((x) >> 8))) |
| 28 | ++#define minor(x) ((int)(0xffff00ff & (x))) |
| 29 | ++#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min))) |
| 30 | ++#endif |
| 31 | + #include <lzlib.h> |
| 32 | + |
| 33 | + #include "tarlz.h" |
| 34 | +diff --git a/decode_lz.cc b/decode_lz.cc |
| 35 | +index 15ac2a7..4bfc627 100644 |
| 36 | +--- a/decode_lz.cc |
| 37 | ++++ b/decode_lz.cc |
| 38 | +@@ -30,6 +30,12 @@ |
| 39 | + !defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__ |
| 40 | + #include <sys/sysmacros.h> // for major, minor, makedev |
| 41 | + #endif |
| 42 | ++#if !defined(HAVE_MAJOR) && !defined(major) |
| 43 | ++/* Replacement for major/minor/makedev. */ |
| 44 | ++#define major(x) ((int)(0x00ff & ((x) >> 8))) |
| 45 | ++#define minor(x) ((int)(0xffff00ff & (x))) |
| 46 | ++#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min))) |
| 47 | ++#endif |
| 48 | + #include <lzlib.h> |
| 49 | + |
| 50 | + #include "tarlz.h" |
0 commit comments