123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/sh /usr/share/dpatch/dpatch-run
- ## 902-file-kfreebsd.dpatch by Robert Millan <rmh@aybabtu.com>
- ##
- ## DP: Detect GNU/kFreeBSD binaries (closes: #307475).
- @DPATCH@
- diff -Naurp file-4.23.orig/src/readelf.c file-4.23/src/readelf.c
- --- file-4.23.orig/src/readelf.c 2008-01-12 17:50:20.000000000 +0000
- +++ file-4.23/src/readelf.c 2008-01-12 17:50:01.000000000 +0000
- @@ -397,6 +397,14 @@ donote(struct magic_set *ms, unsigned ch
- if (file_printf(ms, "Solaris") == -1)
- return size;
- break;
- + case GNU_OS_KFREEBSD:
- + if (file_printf(ms, "kFreeBSD") == -1)
- + return size;
- + break;
- + case GNU_OS_KNETBSD:
- + if (file_printf(ms, "kNetBSD") == -1)
- + return size;
- + break;
- default:
- if (file_printf(ms, "<unknown>") == -1)
- return size;
- diff -Naurp file-4.23.orig/src/readelf.h file-4.23/src/readelf.h
- --- file-4.23.orig/src/readelf.h 2007-12-27 16:08:22.000000000 +0000
- +++ file-4.23/src/readelf.h 2008-01-12 17:50:01.000000000 +0000
- @@ -229,5 +229,7 @@ typedef struct {
- #define GNU_OS_LINUX 0
- #define GNU_OS_HURD 1
- #define GNU_OS_SOLARIS 2
- +#define GNU_OS_KFREEBSD 3
- +#define GNU_OS_KNETBSD 4
-
- #endif
|