diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2017-09-19 22:42:02 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2017-09-19 22:42:02 -0500 |
commit | 1fa4c88ee21866eeb0feae8f6b0bf609a04711cc (patch) | |
tree | 99ddd7dc3d18f0fa1bf52220b1511d4e2a395032 /user/mac-fdisk/mac-fdisk-0.1-headers.patch | |
parent | d9ac52b688c7adfc31c678a7cbc5a1e5c917fb6c (diff) | |
download | packages-1fa4c88ee21866eeb0feae8f6b0bf609a04711cc.tar.gz packages-1fa4c88ee21866eeb0feae8f6b0bf609a04711cc.tar.bz2 packages-1fa4c88ee21866eeb0feae8f6b0bf609a04711cc.tar.xz packages-1fa4c88ee21866eeb0feae8f6b0bf609a04711cc.zip |
user/mac-fdisk: new package
Diffstat (limited to 'user/mac-fdisk/mac-fdisk-0.1-headers.patch')
-rw-r--r-- | user/mac-fdisk/mac-fdisk-0.1-headers.patch | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/user/mac-fdisk/mac-fdisk-0.1-headers.patch b/user/mac-fdisk/mac-fdisk-0.1-headers.patch new file mode 100644 index 000000000..2ac7eaf41 --- /dev/null +++ b/user/mac-fdisk/mac-fdisk-0.1-headers.patch @@ -0,0 +1,112 @@ +Include a lot more headers and remove a bunch of braindead __linux__ checks + +--- a/dump.c ++++ b/dump.c +@@ -30,10 +30,8 @@ + */ + + #include <stdio.h> +-#ifndef __linux__ + #include <stdlib.h> + #include <unistd.h> +-#endif + #include <string.h> + #include <errno.h> + #include <fcntl.h> +--- a/errors.c ++++ b/errors.c +@@ -26,9 +26,7 @@ + */ + + #include <stdio.h> +-#ifndef __linux__ + #include <stdlib.h> +-#endif + #include <string.h> + #include <stdarg.h> + +@@ -115,8 +113,8 @@ + va_end(ap); + + #ifdef __linux__ +- if (value > 0 && value < sys_nerr) { +- fprintf(stderr, " (%s)\n", sys_errlist[value]); ++ if (value > 0) { ++ fprintf(stderr, " (%s)\n", strerror(value)); + } else { + fprintf(stderr, "\n"); + } +@@ -144,8 +142,8 @@ + va_end(ap); + + #ifdef __linux__ +- if (value > 0 && value < sys_nerr) { +- fprintf(stderr, " (%s)\n", sys_errlist[value]); ++ if (value > 0) { ++ fprintf(stderr, " (%s)\n", strerror(value)); + } else { + fprintf(stderr, "\n"); + } +--- a/fdisk.c ++++ b/fdisk.c +@@ -62,6 +62,7 @@ + #include <unistd.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <fcntl.h> + #include <ctype.h> + #include <setjmp.h> +--- a/fdisklabel.c ++++ b/fdisklabel.c +@@ -38,6 +38,7 @@ + #include <unistd.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <fcntl.h> + #include <ctype.h> + #include <setjmp.h> +--- a/io.c ++++ b/io.c +@@ -26,9 +26,9 @@ + */ + + #include <stdio.h> +-#ifndef __linux__ + #include <stdlib.h> + #include <fcntl.h> ++#ifndef __linux__ + #include <SCSI.h> + #else + #ifdef __GLIBC__ +--- a/partition_map.c ++++ b/partition_map.c +@@ -26,10 +26,9 @@ + */ + + #include <stdio.h> +-#ifndef __linux__ ++#include <string.h> + #include <stdlib.h> + #include <unistd.h> +-#endif + #include <errno.h> + + #include <fcntl.h> +--- a/pdisk.c ++++ b/pdisk.c +@@ -32,10 +32,11 @@ + #include <getopt.h> + #include <stddef.h> + #else +-#include <stdlib.h> +-#include <unistd.h> + #include <SIOUX.h> + #endif ++#include <stdlib.h> ++#include <unistd.h> ++#include <string.h> + #include <errno.h> + + #ifdef __linux__ |