File 0001-Avoid-symbol-reference-from-library-to-hosting-progr.patch of Package graywolf
From 49cfb3f403206ca1c09b092b5d044a05826cd9db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Fri, 16 Jun 2017 14:50:23 +0200
Subject: [PATCH 1/8] Avoid symbol reference from library to hosting program
Instead of passing the date string or callback reference as
function arguments, getCompileDate() is called directly.
This breaks linking the library with "--no-undefined" and will
lead to a program abort it the program does not provide the symbol.
---
src/Ylib/program.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/Ylib/program.c b/src/Ylib/program.c
index f2e0c00..87a9533 100644
--- a/src/Ylib/program.c
+++ b/src/Ylib/program.c
@@ -85,18 +85,14 @@ char *YinitProgram(name,version,introTextFunction)
char *version ;
VOID (*introTextFunction)() ;
{
- char *date ,
- *getCompileDate() ;
-
Ytimer_start() ; /* start the elapsed timer */
sprintf(programName,"%s",name);
sprintf(progVersion,"%s",version);
-
- if ( date = getCompileDate() ){
- sprintf(progDate,"%s",date);
- } else {
- sprintf(progDate,"unknown") ;
- }
+
+ /* patched, to avoid nasty reference from library to
+ * possibly undefined program symbol */
+ sprintf(progDate,"unknown") ;
+
sprintf( YmsgG, "%s version:%s date:%s",
programName,progVersion,progDate) ;
--
2.13.1