Module Name: src Committed By: justin Date: Fri Mar 14 01:18:39 UTC 2014
Modified Files: src/lib/librumpuser: rumpuser_dl.c Log Message: If dlopen returns NULL assume we are statically linked and return, rather than getting a warning when dlinfo fails. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/librumpuser/rumpuser_dl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librumpuser/rumpuser_dl.c diff -u src/lib/librumpuser/rumpuser_dl.c:1.26 src/lib/librumpuser/rumpuser_dl.c:1.27 --- src/lib/librumpuser/rumpuser_dl.c:1.26 Thu Mar 13 11:21:54 2014 +++ src/lib/librumpuser/rumpuser_dl.c Fri Mar 14 01:18:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_dl.c,v 1.26 2014/03/13 11:21:54 pooka Exp $ */ +/* $NetBSD: rumpuser_dl.c,v 1.27 2014/03/14 01:18:39 justin Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -40,7 +40,7 @@ #include "rumpuser_port.h" #if !defined(lint) -__RCSID("$NetBSD: rumpuser_dl.c,v 1.26 2014/03/13 11:21:54 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_dl.c,v 1.27 2014/03/14 01:18:39 justin Exp $"); #endif /* !lint */ #include <sys/types.h> @@ -382,6 +382,9 @@ rumpuser_dl_bootstrap(rump_modinit_fn do int error; mainhandle = dlopen(NULL, RTLD_NOW); + /* Will be null if statically linked so just return */ + if (mainhandle == NULL) + return; if (dlinfo(mainhandle, RTLD_DI_LINKMAP, &mainmap) == -1) { fprintf(stderr, "warning: rumpuser module bootstrap " "failed: %s\n", dlerror());