freebsd-ports/sysutils/netdump-server/files/patch-netdumpelf.h
Sam Lawrance 9cb8119ef8 Add netdump-server 0.7.7, RedHat server part of netdump/netconsole
package for linux.

PR:		ports/79049
Submitted by:	Stanislav Sedov
2005-11-11 15:13:45 +00:00

37 lines
1 KiB
C

--- netdumpelf.h.orig Fri Sep 3 23:53:20 2004
+++ netdumpelf.h Sun Mar 20 12:49:10 2005
@@ -1,7 +1,21 @@
#include <sys/time.h>
-#include <linux/types.h>
+#include <sys/types.h>
#include <elf.h>
+typedef __uint32_t __u32;
+typedef __uint64_t __u64;
+typedef __uint16_t __u16;
+typedef __uint8_t __u8;
+typedef uid_t __kernel_uid_t;
+typedef gid_t __kernel_gid_t;
+typedef Elf_Note Elf32_Nhdr;
+typedef Elf_Note Elf64_Nhdr;
+
+#if __FreeBSD_version < 500000
+#define ELFMAG "\177ELF"
+#define SELFMAG 4
+#endif
+
#ifndef NT_TASKSTRUCT
#define NT_TASKSTRUCT 4
#endif
@@ -87,9 +101,9 @@
#define CLIENT_BYTE_ORDER(client) \
((client->machine_type == EM_386 || \
client->machine_type == EM_X86_64 || \
- client->machine_type == EM_IA_64) ? __LITTLE_ENDIAN : __BIG_ENDIAN)
+ client->machine_type == EM_IA_64) ? LITTLE_ENDIAN : BIG_ENDIAN)
-#define BYTE_SWAP_REQUIRED(client) (__BYTE_ORDER != CLIENT_BYTE_ORDER(client))
+#define BYTE_SWAP_REQUIRED(client) (BYTE_ORDER != CLIENT_BYTE_ORDER(client))
typedef unsigned short u16;