Browse Source

libbsd: Downdated (0.7.0 -> 0.6.0) and added compatibility patches

master
Nagy Károly Gábriel 9 years ago
parent
commit
0bc37b25d5
3 changed files with 137 additions and 3 deletions
  1. +93
    -0
      develop/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch
  2. +3
    -3
      develop/libbsd/libbsd.desc
  3. +41
    -0
      develop/libbsd/musl-fix-headers.patch

+ 93
- 0
develop/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch

@ -0,0 +1,93 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libbsd/Revert_Force_setproctitle_into_.init_array_section.patch
# Copyright (C) 2015 The OpenSDE Project
#
# 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 ---
diff -rupN a/configure.ac b/configure.ac
--- a/configure.ac 2013-07-14 13:34:07.000000000 +0200
+++ b/configure.ac 2013-11-12 10:27:39.986117039 +0100
@@ -60,51 +60,6 @@ AC_CHECK_DECL([F_CLOSEM],
[#include <limits.h>
#include <fcntl.h>])
-AC_CACHE_CHECK(
- [for GNU .init_array section support],
- [libbsd_cv_gnu_init_array_support],
- [AC_RUN_IFELSE(
- [AC_LANG_SOURCE(
-[[
-static int rc = 1;
-static void init(int argc) { if (argc == 1) rc = 0; }
-void (*init_func)(int argc) __attribute__((section(".init_array"))) = init;
-int main() { return rc; }
-]]
- )],
- [libbsd_cv_gnu_init_array_support=yes],
- [libbsd_cv_gnu_init_array_support=no],
- [AC_PREPROC_IFELSE(
- [AC_LANG_SOURCE(
-[[
-/* Look for a known libc that supports .init_array with the GNU extension
- * to pass main() arguments to the init functions. */
-#include <stdlib.h>
-#if defined __GLIBC_PREREQ
-# if __GLIBC_PREREQ(2, 4)
-/* glibc supports GNU .init_array since 2.4. */
-# else
-# error glibc does not support GNU .init_array
-# endif
-#else
-/*
- * Basic SysV ABI .init_array support, init functions do not get arguments:
- * - Bionic since its inception.
- * - uClibc since 0.9.29.
- */
-# error unknown whether libc supports GNU .init_array
-#endif
-]]
- )],
- [libbsd_cv_gnu_init_array_support=yes],
- [libbsd_cv_gnu_init_array_support=no])
- ]
- )]
-)
-if test "$libbsd_cv_gnu_init_array_support" = no; then
- AC_MSG_ERROR([missing required GNU .init_array section support])
-fi
-
# Checks for library functions.
AC_MSG_CHECKING([for program_invocation_short_name])
AC_LINK_IFELSE(
diff -rupN a/src/setproctitle.c b/src/setproctitle.c
--- a/src/setproctitle.c 2013-07-14 13:34:07.000000000 +0200
+++ b/src/setproctitle.c 2013-11-12 10:28:55.332787881 +0100
@@ -1,6 +1,6 @@
/*
* Copyright © 2010 William Ahern
- * Copyright © 2012-2013 Guillem Jover <guillem@hadrons.org>
+ * Copyright © 2012 Guillem Jover <guillem@hadrons.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
@@ -155,8 +155,8 @@ spt_copyargs(int argc, char *argv[])
return 0;
}
-void
-setproctitle_init(int argc, char *argv[], char *envp[])
+static void
+spt_init(int argc, char *argv[], char *envp[])
{
char *base, *end, *nul, *tmp;
int i, envc, error;

+ 3
- 3
develop/libbsd/libbsd.desc

@ -28,7 +28,7 @@
[L] BSD
[S] Stable
[V] 0.7.0
[P] X -----5---9 150.000
[V] 0.6.0
[P] X -?---5---9 150.000
[D] 3253238986 libbsd-0.7.0.tar.xz http://libbsd.freedesktop.org/releases/
[D] 1565316259 libbsd-0.6.0.tar.xz http://libbsd.freedesktop.org/releases/

+ 41
- 0
develop/libbsd/musl-fix-headers.patch

@ -0,0 +1,41 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../libbsd/musl-fix-headers.patch
# Copyright (C) 2015 The OpenSDE Project
#
# 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 ---
--- libbsd-0.6.0.orig/src/flopen.c
+++ libbsd-0.6.0/src/flopen.c
@@ -32,6 +32,7 @@
#include <sys/stat.h>
#include <errno.h>
+#include <fcntl.h>
#include <stdarg.h>
#include <unistd.h>
#include <libutil.h>
--- libbsd-0.6.0.orig/src/nlist.c
+++ libbsd-0.6.0/src/nlist.c
@@ -37,10 +37,11 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <arpa/inet.h>
+#include <linux/a.out.h>
#include <errno.h>
-#include <a.out.h>
#include <stdio.h>
+#include <fcntl.h>
#include <string.h>
#include <unistd.h>

Loading…
Cancel
Save