diff --git a/src/backend/port/dynloader/freebsd.c b/src/backend/port/dynloader/freebsd.c index 5b18707928..87b661696a 100644 --- a/src/backend/port/dynloader/freebsd.c +++ b/src/backend/port/dynloader/freebsd.c @@ -1,4 +1,4 @@ -/*- +/* * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -37,12 +37,13 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; #endif /* LIBC_SCCS and not lint */ #include "postgres.h" -#include "dynloader.h" #include #include #include +#include "dynloader.h" + static char error_message[BUFSIZ]; char * @@ -67,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num) if ((vp = dlopen((char *) file, num)) == NULL) snprintf(error_message, sizeof(error_message), - "dlopen '%s' failed. (%s)", file, dlerror()); + "dlopen (%s) failed: %s", file, dlerror()); return vp; #endif } diff --git a/src/backend/port/dynloader/netbsd.c b/src/backend/port/dynloader/netbsd.c index 72bd516597..f1271da72d 100644 --- a/src/backend/port/dynloader/netbsd.c +++ b/src/backend/port/dynloader/netbsd.c @@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num) if ((vp = dlopen((char *) file, num)) == NULL) snprintf(error_message, sizeof(error_message), - "dlopen (%s) failed", file); + "dlopen (%s) failed: %s", file, dlerror()); return vp; #endif } diff --git a/src/backend/port/dynloader/openbsd.c b/src/backend/port/dynloader/openbsd.c index 72bd516597..f1271da72d 100644 --- a/src/backend/port/dynloader/openbsd.c +++ b/src/backend/port/dynloader/openbsd.c @@ -68,7 +68,7 @@ BSD44_derived_dlopen(const char *file, int num) if ((vp = dlopen((char *) file, num)) == NULL) snprintf(error_message, sizeof(error_message), - "dlopen (%s) failed", file); + "dlopen (%s) failed: %s", file, dlerror()); return vp; #endif }