Skip to content
Commit 7f1ec872 authored by Vicente Olivert Riera's avatar Vicente Olivert Riera Committed by Peter Korsgaard
Browse files

openntpd: fix linking problem when building statically

The problem looks like this:

  CCLD     ntpd
../compat/.libs/libcompat.a(libcompat_la-arc4random.o): In function
`arc4random':
/br/output/build/openntpd-5.7p4/compat/arc4random.c:183: undefined
reference to `pthread_mutex_lock'
/br/output/build/openntpd-5.7p4/compat/arc4random.c:185: undefined
reference to `pthread_mutex_unlock'
../compat/.libs/libcompat.a(libcompat_la-arc4random.o): In function
`arc4random_buf':
/br/output/build/openntpd-5.7p4/compat/arc4random.c:192: undefined
reference to `pthread_mutex_lock'
/br/output/build/openntpd-5.7p4/compat/arc4random.c:194: undefined
reference to `pthread_mutex_unlock'
/br/output/build/openntpd-5.7p4/compat/arc4random.c:194: undefined
reference to `pthread_mutex_unlock'
collect2: error: ld returned 1 exit status

Adding -pthread to CFLAGS fixes the problem.

Fixes:

  http://autobuild.buildroot.net/results/b12/b120b6da87ae4eb355d06f2fd8f4fc8050410897/



[Peter: unconditionally pass in CFLAGS, add comment about why]
Signed-off-by: default avatarVicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 97ab4865
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment