pkgsrc/emulators/tme/patches/patch-tmesh_tmesh.c
martin 9601431905 Make the emulator not crash on EOF in the tmesh.
Also, since pkgsrc knows very well where we install the needed libraries,
use that as a default path if the user does not supply an LTDL_LIBRARY_PATH.
2013-11-02 21:53:36 +00:00

19 lines
545 B
C

$NetBSD: patch-tmesh_tmesh.c,v 1.1 2013/11/02 21:53:36 martin Exp $
Supply a sane default value for LTDL_LIBRARY_PATH.
--- tmesh/tmesh.c.orig 2009-08-30 19:06:38.000000000 +0200
+++ tmesh/tmesh.c 2013-11-02 21:59:21.000000000 +0100
@@ -583,6 +586,12 @@
}
}
+#ifdef LTDL_LIBRARY_PATH_DEFAULT
+ /* if the user did not provide a library path, put a sane default */
+ if (getenv("LTDL_LIBRARY_PATH") == NULL)
+ setenv("LTDL_LIBRARY_PATH", LTDL_LIBRARY_PATH_DEFAULT, 0);
+#endif
+
/* initialize libtme: */
(void) tme_init();