Better patch from upstream.

This commit is contained in:
ajacoutot 2012-10-01 12:47:55 +00:00
parent 7b4badb3fd
commit ef0f3cb1bd
2 changed files with 32 additions and 13 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.143 2012/09/28 13:04:20 dcoppa Exp $
# $OpenBSD: Makefile,v 1.144 2012/10/01 12:47:55 ajacoutot Exp $
COMMENT-main= Common Unix Printing System
COMMENT-libs= CUPS libraries and headers
@ -7,7 +7,7 @@ VERSION= 1.6.1
DISTNAME= cups-${VERSION}-source
EXTRACT_SUFX= .tar.bz2
REVISION-main= 6
REVISION-main= 7
REVISION-libs= 4
PKGNAME-main= cups-${VERSION}

View File

@ -1,23 +1,42 @@
$OpenBSD: patch-scheduler_main_c,v 1.8 2012/09/30 09:28:04 ajacoutot Exp $
$OpenBSD: patch-scheduler_main_c,v 1.9 2012/10/01 12:47:55 ajacoutot Exp $
https://www.cups.org/str.php?L4197
--- scheduler/main.c.orig Mon Apr 23 21:19:19 2012
+++ scheduler/main.c Thu Jul 26 10:00:31 2012
@@ -365,16 +365,6 @@ main(int argc, /* I - Number of command-line args
+++ scheduler/main.c Mon Oct 1 14:39:10 2012
@@ -65,11 +65,16 @@
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
# include <malloc.h>
#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */
+
#ifdef HAVE_NOTIFY_H
# include <notify.h>
#endif /* HAVE_NOTIFY_H */
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+
/*
* Local functions...
*/
@@ -365,15 +370,15 @@ main(int argc, /* I - Number of command-line args
}
}
-#ifdef __OpenBSD__
- /*
- * Call _thread_sys_closefrom() so the child process doesn't reset the
- * parent's file descriptors to be blocking. This is a workaround for a
+#if defined(__OpenBSD__) && OpenBSD < 201211
/*
* Call _thread_sys_closefrom() so the child process doesn't reset the
* parent's file descriptors to be blocking. This is a workaround for a
- * limitation of userland libpthread on OpenBSD.
- */
-
- _thread_sys_closefrom(0);
+ * limitation of userland libpthread on older versions of OpenBSD.
*/
_thread_sys_closefrom(0);
-#endif /* __OpenBSD__ */
-
+#endif /* __OpenBSD__ && OpenBSD < 201211 */
/*
* Since CoreFoundation and DBUS both create fork-unsafe data on execution of
* a program, and since this kind of really unfriendly behavior seems to be