mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 10:35:03 +08:00
Rename getline to get_line so we don't conflict with crappy GNU headers that wrongly expose getline when _GNU_SOURCE isn't set. Bug #17.
This commit is contained in:
parent
c737e99e65
commit
2136d44495
2
common.c
2
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;
|
||||
|
2
common.h
2
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);
|
||||
|
@ -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;
|
||||
|
2
duid.c
2
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)
|
||||
|
Loading…
Reference in New Issue
Block a user