aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt4
-rw-r--r--pseudo_client.c4
-rw-r--r--pseudo_util.c14
3 files changed, 10 insertions, 12 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 8c90765..cafdeba 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2013-01-30:
+ * (seebs) Subtle tweaks to avoid GLIBC_2.7 dependencies which
+ can cause trouble trying to copy libpseudo.so to older hosts.
+
2012-12-13:
* (seebs) tag 1.4.2.
diff --git a/pseudo_client.c b/pseudo_client.c
index 4150a89..a7ba100 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -1,7 +1,7 @@
/*
* pseudo_client.c, pseudo client library code
*
- * Copyright (c) 2008-2010 Wind River Systems, Inc.
+ * Copyright (c) 2008-2013 Wind River Systems, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License version 2.1 as
@@ -17,6 +17,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
+#define _GNU_SOURCE
+
#include <stdio.h>
#include <signal.h>
#include <stdarg.h>
diff --git a/pseudo_util.c b/pseudo_util.c
index 95844fa..ca2f0a4 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -1,7 +1,7 @@
/*
* pseudo_util.c, miscellaneous utility functions
*
- * Copyright (c) 2008-2010 Wind River Systems, Inc.
+ * Copyright (c) 2008-2013 Wind River Systems, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License version 2.1 as
@@ -1244,11 +1244,7 @@ pseudo_etc_file(const char *file, char *realname, int flags, char **search_dirs,
continue;
snprintf(filename, pseudo_path_max(), "%s/etc/%s",
s, file);
- if (flags & O_CREAT) {
- rc = open(filename, flags, 0600);
- } else {
- rc = open(filename, flags);
- }
+ rc = open(filename, flags, 0600);
if (rc >= 0) {
if (realname)
strcpy(realname, filename);
@@ -1275,11 +1271,7 @@ pseudo_etc_file(const char *file, char *realname, int flags, char **search_dirs,
snprintf(filename, pseudo_path_max(), "/etc/%s", file);
pseudo_debug(2, "falling back on <%s> for <%s>\n",
filename, file);
- if (flags & O_CREAT) {
- rc = open(filename, flags, 0600);
- } else {
- rc = open(filename, flags);
- }
+ rc = open(filename, flags, 0600);
if (rc >= 0 && realname)
strcpy(realname, filename);
return rc;