sysvinit/startpar-0.53.dif

38 lines
985 B
Plaintext

--- Makefile
+++ Makefile 2009-03-13 15:01:12.317145442 +0100
@@ -15,17 +15,17 @@ OBJS = $(SRCS:.c=.o)
CC = gcc
OPTFLAGS = -O2 -g -Wall -W
-CFLAGS = $(OPTFLAGS) -D_GNU_SOURCE $(ISSUSE)
+CFLAGS = $(OPTFLAGS) -D_GNU_SOURCE
ifeq ($(MAKECMDGOALS),makeboot)
CFLAGS += -DTEST
endif
.c.o:
- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c $<
+ $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" $(ISSUSE) -c $<
startpar: $(OBJS)
- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -o $@ $(OBJS)
+ $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" $(ISSUSE) -o $@ $(OBJS)
makeboot: makeboot.c
--- makeboot.c
+++ makeboot.c 2009-03-13 13:28:08.824501381 +0100
@@ -278,8 +278,10 @@ static void filter_files(const char *dir
#endif
ndirs = scandir(path, &dirlist, dirfilter, alphasort);
#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
- if (i >= 0)
+ if (i >= 0) {
(void)posix_fadvise(i, 0, 0, POSIX_FADV_DONTNEED);
+ close(i);
+ }
#endif
/* mark all matching nodes */
if (ndirs >= 0) {