File: kfreebsd-hacks.dpatch

package info (click to toggle)
ldm 2%3A2.2.15-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,408 kB
  • ctags: 548
  • sloc: ansic: 4,582; sh: 277; python: 259; makefile: 111; sed: 16
file content (29 lines) | stat: -rwxr-xr-x 985 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh /usr/share/dpatch/dpatch-run
## kfreebsd-hacks.dpatch by  <vagrant@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: add support for kfreebsd by defining WEXITED and HOST_NAME_MAX.

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' ldm-2.1.1~/src/ldm.c ldm-2.1.1/src/ldm.c
--- ldm-2.1.1~/src/ldm.c	2010-04-08 17:19:13.000000000 -0700
+++ ldm-2.1.1/src/ldm.c	2010-04-08 17:24:34.000000000 -0700
@@ -50,6 +50,18 @@
 
 #define LOGFILE "/var/log/ldm.log"
 
+#if defined(__FreeBSD__) && ! defined(__FreeBSD_kernel__)
+# define __FreeBSD_kernel__ __FreeBSD__
+#endif
+
+#if ! defined(WEXITED)
+#define WEXITED 0
+#endif
+
+#if defined(__FreeBSD_kernel__) && ! defined(HOST_NAME_MAX)
+#define HOST_NAME_MAX sysconf(_SC_HOST_NAME_MAX)
+#endif
+
 GHashTable *ldminfo_hash = NULL;
 GList *host_list = NULL;
 volatile sig_atomic_t unexpected_child = 0;