dhcpcd/common.h

33 lines
709 B
C
Raw Normal View History

2006-11-28 04:23:22 +08:00
/*
* dhcpcd - DHCP client daemon
* Copyright 2006-2007 Roy Marples <roy@marples.name>
2006-11-28 04:23:22 +08:00
*
* Distributed under the terms of the GNU General Public License v2
2006-11-28 04:23:22 +08:00
*/
#ifndef COMMON_H
#define COMMON_H
2007-04-06 02:11:05 +08:00
/* string.h pulls in features.h so the below define checks work */
#include <string.h>
/* Only GLIBC doesn't support strlcpy */
#ifdef __GLIBC__
# if ! defined(__UCLIBC__) && ! defined (__dietlibc__)
size_t strlcpy (char *dst, const char *src, size_t size);
# endif
#endif
#ifdef __linux__
void srandomdev (void);
#endif
void close_fds (void);
int get_time (struct timeval *tp);
long uptime (void);
void writepid (int fd, pid_t pid);
2006-11-28 04:23:22 +08:00
void *xmalloc (size_t size);
char *xstrdup (const char *str);
2006-11-28 04:23:22 +08:00
#endif