PERFORCE change 83158 for review
soc-tyler
soc-tyler at FreeBSD.org
Mon Sep 5 17:38:08 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=83158
Change 83158 by soc-tyler at soc-tyler_launchd on 2005/09/06 00:37:50
Start adding some compat options for OpenBSD....giving up until they get
a kernel that doesn't suck.
Affected files ...
.. //depot/projects/soc2005/launchd/includes/compat.h#1 add
.. //depot/projects/soc2005/launchd/launchd.c#22 edit
.. //depot/projects/soc2005/launchd/launchdebugd/Makefile#3 edit
.. //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.c#2 edit
.. //depot/projects/soc2005/launchd/launchproxy/Makefile#3 edit
.. //depot/projects/soc2005/launchd/launchproxy/launchproxy.c#2 edit
.. //depot/projects/soc2005/launchd/misc.c#2 edit
Differences ...
==== //depot/projects/soc2005/launchd/launchd.c#22 (text+ko) ====
@@ -56,7 +56,9 @@
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <net/if.h>
+#ifndef __OpenBSD__
#include <net/if_var.h>
+#endif
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/nd6.h>
@@ -80,6 +82,7 @@
#include "launch.h"
#include "launch_priv.h"
#include "launchd.h"
+#include "compat.h"
#ifdef _BUILD_DARWIN_
#include "bootstrap_internal.h"
==== //depot/projects/soc2005/launchd/launchdebugd/Makefile#3 (text+ko) ====
@@ -1,7 +1,7 @@
# $FreeBSD$
PROG= launchdebugd
-SRCS= launchdebugd.c liblaunch.c
+SRCS= launchdebugd.c liblaunch.c misc.c
MAN= launchdebugd.8
LAUNCHD= ${.CURDIR}/../
==== //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.c#2 (text+ko) ====
@@ -35,6 +35,7 @@
#include <libgen.h>
#include "launch.h"
+#include "compat.h"
static void launch_print_obj(launch_data_t o, FILE *w);
==== //depot/projects/soc2005/launchd/launchproxy/Makefile#3 (text+ko) ====
@@ -1,12 +1,13 @@
# $FreeBSD$
PROG= launchproxy
-SRCS= launchproxy.c liblaunch.c
+SRCS= launchproxy.c liblaunch.c misc.c
MAN= launchproxy.8
LAUNCHD= ${.CURDIR}/../
CFLAGS+= -g -Wall -W -Wshadow -Wpadded -I${LAUNCHD}/includes
+LDFLAGS+= -lpthread
.PATH: ${LAUNCHD}
==== //depot/projects/soc2005/launchd/launchproxy/launchproxy.c#2 (text+ko) ====
@@ -27,6 +27,7 @@
*
* @APPLE_LICENSE_HEADER_END@
*/
+
#ifdef _BUILD_DARWIN_
#include <Security/Authorization.h>
#include <Security/AuthorizationTags.h>
@@ -53,6 +54,7 @@
#include "launch.h"
#include "launchd.h"
+#include "compat.h"
static int kq = 0;
==== //depot/projects/soc2005/launchd/misc.c#2 (text+ko) ====
@@ -37,6 +37,7 @@
#include <libutil.h>
#include "property.h"
+#include "compat.h"
int property_count(properties list) {
int count = 1; // there will be at least one element
@@ -50,3 +51,11 @@
return count;
}
+
+/* For some reason OpenBSD hasn't assimilated NetBSD's getprogname() */
+#ifdef __OpenBSD__
+const char *getprogname() {
+ return (__progname);
+}
+#endif
+
More information about the p4-projects
mailing list