Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser If dlopen returns NULL assume we are statica...
details: https://anonhg.NetBSD.org/src/rev/30b6733bf24a
branches: trunk
changeset: 327685:30b6733bf24a
user: justin <justin%NetBSD.org@localhost>
date: Fri Mar 14 01:18:39 2014 +0000
description:
If dlopen returns NULL assume we are statically linked and return,
rather than getting a warning when dlinfo fails.
diffstat:
lib/librumpuser/rumpuser_dl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 1120e949cd97 -r 30b6733bf24a lib/librumpuser/rumpuser_dl.c
--- a/lib/librumpuser/rumpuser_dl.c Fri Mar 14 01:05:57 2014 +0000
+++ b/lib/librumpuser/rumpuser_dl.c Fri Mar 14 01:18:39 2014 +0000
@@ -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 @@
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());
Home |
Main Index |
Thread Index |
Old Index