• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/ulogd/ulogd-01-pthread-conditional.patch
Gustavo ZacariasGustavo Zacarias committed ce9029119a310 Dec 2013
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 389bade377e6e7335304636ea1ebd0a81b0c235e Mon Sep 17 00:00:00 2001
2
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3
Date: Tue, 10 Dec 2013 09:11:00 -0300
4
Subject: [PATCH ulogd] ulogd: use AC_SEARCH_LIBS for libpthread
5
​
6
Some uClibc-based toolchains lack threading support, so use
7
AC_SEARCH_LIB instead of AC_CHECK_LIB to check for libpthread
8
availability and link conditionally if found since it's only used for
9
the database backends.
10
​
11
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
12
---
13
 configure.ac    | 3 ++-
14
 src/Makefile.am | 4 ++--
15
 2 files changed, 4 insertions(+), 3 deletions(-)
16
​
17
diff --git a/configure.ac b/configure.ac
18
index 7f5ffa9..5e45aaa 100644
19
--- a/configure.ac
20
+++ b/configure.ac
21
@@ -39,7 +39,8 @@ AC_CHECK_FUNCS(socket strerror)
22
 regular_CFLAGS="-Wall -Wextra -Wno-unused-parameter"
23
 AC_SUBST([regular_CFLAGS])
24
 
25
-AC_CHECK_LIB(pthread, pthread_create)
26
+AC_SEARCH_LIBS([pthread_create], [pthread], [libpthread_LIBS="$LIBS"; LIBS=""])
27
+AC_SUBST([libpthread_LIBS])
28
 
29
 dnl Check for the right nfnetlink version
30
 PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.1])
31
diff --git a/src/Makefile.am b/src/Makefile.am
32
index 1097468..998e776 100644
33
--- a/src/Makefile.am
34
+++ b/src/Makefile.am
35
@@ -7,5 +7,5 @@ AM_CFLAGS = ${regular_CFLAGS}
36
 sbin_PROGRAMS = ulogd
37
 
38
 ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c addr.c
39
-ulogd_LDADD   = ${libdl_LIBS}
40
-ulogd_LDFLAGS = -export-dynamic -lpthread
41
+ulogd_LDADD   = ${libdl_LIBS} ${libpthread_LIBS}
42
+ulogd_LDFLAGS = -export-dynamic
43
-- 
44
1.8.3.2
45
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.