# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../dietlibc/patches/pkg_sysvinit.patch
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2004 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---

--- ./src/Makefile.orig	Mon May  6 11:15:52 2002
+++ ./src/Makefile	Mon May  6 11:17:08 2002
@@ -23,10 +23,6 @@
 INSTALL		= install -o $(BIN_OWNER) -g $(BIN_GROUP)
 MANDIR		= /usr/share/man
 
-# Additional libs for Gnu Libc
-ifneq ($(wildcard /usr/lib/libcrypt.a),)
-LCRYPT		= -lcrypt
-endif
 
 all:		$(PROGS)
 
@@ -46,7 +42,7 @@
 		$(CC) $(LDFLAGS) -o $@ runlevel.o
 
 sulogin:	sulogin.o
-		$(CC) $(LDFLAGS) $(STATIC) -o $@ sulogin.o $(LCRYPT)
+		$(CC) $(LDFLAGS) $(STATIC) -o $@ sulogin.o
 
 wall:		dowall.o wall.o
 		$(CC) $(LDFLAGS) -o $@ dowall.o wall.o
--- ./src/init.c.orig	Sun May  5 03:27:31 2002
+++ ./src/init.c	Sat May  4 18:11:40 2002
@@ -49,6 +49,8 @@
 #include <sys/syslog.h>
 #include <sys/time.h>
 
+#define UTMP_FILE _PATH_UTMP
+
 #ifdef __i386__
 #  if (__GLIBC__ >= 2)
      /* GNU libc 2.x */
--- ./src/last.c.orig	Sun May  5 03:29:32 2002
+++ ./src/last.c	Sun May  5 03:04:26 2002
@@ -36,6 +36,8 @@
 #include <arpa/inet.h>
 #include "oldutmp.h"
 
+#define WTMP_FILE _PATH_WTMP
+
 #ifndef SHUTDOWN_TIME
 #  define SHUTDOWN_TIME 254
 #endif
--- ./src/utmp.c.orig	Sun May  5 03:30:04 2002
+++ ./src/utmp.c	Sat May  4 18:12:39 2002
@@ -17,6 +17,8 @@
 #include <fcntl.h>
 #include <string.h>
 #include <utmp.h>
+#define UTMP_FILE _PATH_UTMP
+#define WTMP_FILE _PATH_WTMP
 
 #include "init.h"
 #include "initreq.h"
--- sysvinit-2.85/src/ifdown.c.orig	2003-09-20 04:47:44.000000000 +0200
+++ sysvinit-2.85/src/ifdown.c	2003-09-20 04:47:54.000000000 +0200
@@ -14,7 +14,7 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <sys/time.h>
-#include <sys/errno.h>
+#include <errno.h>
 
 #include <net/if.h>
 #include <netinet/in.h>
--- sysvinit-2.85/src/last.c.orig	2003-09-20 04:51:58.000000000 +0200
+++ sysvinit-2.85/src/last.c	2003-09-20 04:52:09.000000000 +0200
@@ -19,7 +19,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <time.h>
 #include <stdio.h>
 #include <ctype.h>