902-file-kfreebsd.dpatch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 92-file-kfreebsd.dpatch by Robert Millan <rmh@aybabtu.com>
  3. ##
  4. ## DP: Detect GNU/kFreeBSD binaries (closes: #307475).
  5. @DPATCH@
  6. diff -Naur file-4.20.orig/src/readelf.c file-4.20/src/readelf.c
  7. --- file-4.20.orig/src/readelf.c 2007-01-18 05:45:35.000000000 +0000
  8. +++ file-4.20/src/readelf.c 2007-03-27 12:23:14.000000000 +0000
  9. @@ -396,6 +396,14 @@
  10. if (file_printf(ms, "Solaris") == -1)
  11. return size;
  12. break;
  13. + case GNU_OS_KFREEBSD:
  14. + if (file_printf(ms, "kFreeBSD") == -1)
  15. + return size;
  16. + break;
  17. + case GNU_OS_KNETBSD:
  18. + if (file_printf(ms, "kNetBSD") == -1)
  19. + return size;
  20. + break;
  21. default:
  22. if (file_printf(ms, "<unknown>") == -1)
  23. return size;
  24. diff -Naur file-4.20.orig/src/readelf.h file-4.20/src/readelf.h
  25. --- file-4.20.orig/src/readelf.h 2007-01-12 17:40:53.000000000 +0000
  26. +++ file-4.20/src/readelf.h 2007-03-27 12:23:14.000000000 +0000
  27. @@ -232,5 +232,7 @@
  28. #define GNU_OS_LINUX 0
  29. #define GNU_OS_HURD 1
  30. #define GNU_OS_SOLARIS 2
  31. +#define GNU_OS_KFREEBSD 3
  32. +#define GNU_OS_KNETBSD 4
  33. #endif