Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37842303
en ru br
ALT Linux repos
S:5.2.0-alt1_13
5.0: 0.9.21.2-alt2
3.0: 0.8.10-alt1

Group :: System/Libraries
RPM: libprelude

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libprelude-5.2.0-fix-test_rwlock1.patch
Download


Description: Fix test-rwlock1 when --as-needed is the default.
Author: Michael Hudson-Doyle <michael.hudson@ubuntu.com>
Forwarded: no
Last-Update: 2018-07-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/libmissing/tests/test-rwlock1.c
+++ b/libmissing/tests/test-rwlock1.c
@@ -54,7 +54,10 @@
 
 #define SUCCEED() exit (0)
 #define FAILURE() exit (1)
-#define UNEXPECTED(n) (fprintf (stderr, "Unexpected outcome %d\n", n), abort ())
+/* The pointless reference to errno below is to ensure that the test binary
+ * gets a DT_NEEDED for libpthread even if the link is done with --as-needed
+ * (which is the default in Ubuntu) */
+#define UNEXPECTED(n) (fprintf (stderr, "Unexpected outcome %d errno %d\n", n, errno), abort ())
 
 /* The main thread creates the waiting writer and the requesting reader threads
    in the default way; this guarantees that they have the same priority.
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin