-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
8858b5e
commit 0fe617f
Showing
1 changed file
with
15 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,39 @@ | ||
diff --git a/create.cc b/create.cc | ||
index 11c4041..fcfcc41 100644 | ||
index 11c4041..06d628c 100644 | ||
--- a/create.cc | ||
+++ b/create.cc | ||
@@ -27,6 +27,11 @@ | ||
@@ -26,6 +26,8 @@ | ||
#if !defined __FreeBSD__ && !defined __OpenBSD__ && !defined __NetBSD__ && \ | ||
!defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__ | ||
#include <sys/sysmacros.h> // for major, minor | ||
+#else | ||
+#include <sys/types.h> // for major, minor | ||
#endif | ||
+#if !defined(HAVE_MAJOR) && !defined(major) | ||
+/* Replacement for major/minor/makedev. */ | ||
+#define major(x) ((int)(0x00ff & ((x) >> 8))) | ||
+#define minor(x) ((int)(0xffff00ff & (x))) | ||
+#endif | ||
#include <ftw.h> | ||
#include <grp.h> | ||
#include <pwd.h> | ||
diff --git a/decode.cc b/decode.cc | ||
index 1742df2..31abc3f 100644 | ||
index 1742df2..6743491 100644 | ||
--- a/decode.cc | ||
+++ b/decode.cc | ||
@@ -30,6 +30,12 @@ | ||
@@ -29,6 +29,8 @@ | ||
#if !defined __FreeBSD__ && !defined __OpenBSD__ && !defined __NetBSD__ && \ | ||
!defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__ | ||
#include <sys/sysmacros.h> // for major, minor, makedev | ||
+#else | ||
+#include <sys/types.h> // for major, minor, makedev | ||
#endif | ||
+#if !defined(HAVE_MAJOR) && !defined(major) | ||
+/* Replacement for major/minor/makedev. */ | ||
+#define major(x) ((int)(0x00ff & ((x) >> 8))) | ||
+#define minor(x) ((int)(0xffff00ff & (x))) | ||
+#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min))) | ||
+#endif | ||
#include <lzlib.h> | ||
|
||
#include "tarlz.h" | ||
diff --git a/decode_lz.cc b/decode_lz.cc | ||
index 15ac2a7..4bfc627 100644 | ||
index 15ac2a7..a31384b 100644 | ||
--- a/decode_lz.cc | ||
+++ b/decode_lz.cc | ||
@@ -30,6 +30,12 @@ | ||
@@ -29,6 +29,8 @@ | ||
#if !defined __FreeBSD__ && !defined __OpenBSD__ && !defined __NetBSD__ && \ | ||
!defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__ | ||
#include <sys/sysmacros.h> // for major, minor, makedev | ||
+#else | ||
+#include <sys/types.h> // for major, minor, makedev | ||
#endif | ||
+#if !defined(HAVE_MAJOR) && !defined(major) | ||
+/* Replacement for major/minor/makedev. */ | ||
+#define major(x) ((int)(0x00ff & ((x) >> 8))) | ||
+#define minor(x) ((int)(0xffff00ff & (x))) | ||
+#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min))) | ||
+#endif | ||
#include <lzlib.h> | ||
|
||
#include "tarlz.h" |