openbsd-ports/x11/xview/config/patches/p-olwm-defaults_c

27 lines
768 B
Plaintext

--- clients/olwm/defaults.c.orig 1993-06-29 07:11:43.000000000 +0200
+++ clients/olwm/defaults.c 2003-12-30 01:31:15.000000000 +0100
@@ -25,9 +25,9 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xresource.h>
-#ifdef OW_I18N_L4
+/* #ifdef OW_I18N_L4 */
#include <sys/param.h>
-#endif
+/* #endif */
#include "i18n.h"
#include "ollocale.h"
@@ -80,7 +80,11 @@ GetUserDefaults(dpy)
if (homedir != NULL) {
(void) strcpy(filename, homedir);
(void) strcat(filename, "/.Xdefaults-");
+#if defined(__OpenBSD__)
+ if (0 == gethostname(hostname, sizeof(hostname))) {
+#else
if (0 == gethostname(hostname, sizeof(hostname), &namelen)) {
+#endif
(void) strcat(filename, hostname);
fileDB = XrmGetFileDatabase(filename);
}