]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Rename getline to get_line so we don't conflict with crappy GNU headers that wrongly...
authorRoy Marples <roy@marples.name>
Wed, 6 Feb 2008 10:18:03 +0000 (10:18 +0000)
committerRoy Marples <roy@marples.name>
Wed, 6 Feb 2008 10:18:03 +0000 (10:18 +0000)
common.c
common.h
configure.c
duid.c
info.c

index 161b891efc640cea3b11fa5de34974d600b8b30b..5d5bacfb618d370cd984e0c720ee3b59d155c5f3 100644 (file)
--- a/common.c
+++ b/common.c
@@ -43,7 +43,7 @@
 
 /* Handy routine to read very long lines in text files.
  * This means we read the whole line and avoid any nasty buffer overflows. */
-char *getline (FILE *fp)
+char *get_line (FILE *fp)
 {
        char *line = NULL;
        char *p;
index 57e4e79ef1dac92a9fce8ef62108568a395911de..4b26318b02ec40c461f1a73cccfad6136efab926 100644 (file)
--- a/common.h
+++ b/common.h
@@ -53,7 +53,7 @@ void srandomdev (void);
 #endif
 
 void close_fds (void);
-char *getline (FILE *fp);
+char *get_line (FILE *fp);
 int get_time (struct timeval *tp);
 time_t uptime (void);
 void writepid (int fd, pid_t pid);
index 559ba3386542e07cba953222fd31fd9a34c94a48..b5add7fe06cc3f5340cd41252467a4dab8b8bc1c 100644 (file)
@@ -285,7 +285,7 @@ static int _make_ntp (const char *file, const char *ifname, const dhcp_t *dhcp)
                        return (-1);
                }
        } else {
-               while (tomatch != 0 && (line = getline (f))) {
+               while (tomatch != 0 && (line = get_line (f))) {
                        struct in_addr addr;
 
                        a = line;
diff --git a/duid.c b/duid.c
index 9fd6f4be9a20fa81949f62598c5c23503f830faf..e4dd83b948044c700a978937d9fcc9fab4c2f84a 100644 (file)
--- a/duid.c
+++ b/duid.c
@@ -60,7 +60,7 @@ size_t get_duid (unsigned char *duid, const interface_t *iface)
        /* If we already have a DUID then use it as it's never supposed
         * to change once we have one even if the interfaces do */
        if ((f = fopen (DUIDFILE, "r"))) {
-               char *line = getline (f);
+               char *line = get_line (f);
                if (line) {
                        len = hwaddr_aton (NULL, line);
                        if (len && len <= DUID_LEN)
diff --git a/info.c b/info.c
index 0d1106ebabca9db3793adddb47ba9afbec112ea0..9c788b33ae7dc07145b62fa13f4867d8572d1593 100644 (file)
--- a/info.c
+++ b/info.c
@@ -333,7 +333,7 @@ bool read_info (const interface_t *iface, dhcp_t *dhcp)
 
        dhcp->frominfo = true;
 
-       while ((line = getline (fp))) {
+       while ((line = get_line (fp))) {
                var = line;
 
                /* Strip leading spaces/tabs */