Header cleanup on two more networking files (move libbb.h to the top and
remove #includes that libbb.h already does), plus a minor cleanup of libbb.h to move #includes towards the top of the file where we can see 'em.
This commit is contained in:
parent
12d87550a3
commit
362dc2bf33
@ -25,8 +25,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_SELINUX
|
#ifdef CONFIG_SELINUX
|
||||||
#include <selinux/selinux.h>
|
#include <selinux/selinux.h>
|
||||||
#endif
|
#endif
|
||||||
@ -40,6 +38,17 @@
|
|||||||
# include "sha1.h"
|
# include "sha1.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Try to pull in PATH_MAX */
|
||||||
|
#include <limits.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 256
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DMALLOC
|
||||||
|
#include <dmalloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Some useful definitions */
|
/* Some useful definitions */
|
||||||
#undef FALSE
|
#undef FALSE
|
||||||
#define FALSE ((int) 0)
|
#define FALSE ((int) 0)
|
||||||
@ -457,12 +466,11 @@ extern void bb_xread_all(int fd, void *buf, size_t count);
|
|||||||
extern unsigned char bb_xread_char(int fd);
|
extern unsigned char bb_xread_char(int fd);
|
||||||
|
|
||||||
#ifndef COMM_LEN
|
#ifndef COMM_LEN
|
||||||
/*#include <sched.h> *//* Task command name length */
|
|
||||||
#ifdef TASK_COMM_LEN
|
#ifdef TASK_COMM_LEN
|
||||||
#define COMM_LEN TASK_COMM_LEN
|
#define COMM_LEN TASK_COMM_LEN
|
||||||
#else
|
#else
|
||||||
#define COMM_LEN 16 /* synchronize with size of comm in struct task_struct
|
/* synchronize with sizeof(task_struct.comm) in /usr/include/linux/sched.h */
|
||||||
in /usr/include/linux/sched.h */
|
#define COMM_LEN 16
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -530,17 +538,6 @@ extern uint32_t *bb_crc32_filltable (int endian);
|
|||||||
#define RB_POWER_OFF 0x4321fedc
|
#define RB_POWER_OFF 0x4321fedc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Try to pull in PATH_MAX */
|
|
||||||
#include <limits.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#ifndef PATH_MAX
|
|
||||||
#define PATH_MAX 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DMALLOC
|
|
||||||
#include <dmalloc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern const char BB_BANNER[];
|
extern const char BB_BANNER[];
|
||||||
|
|
||||||
#endif /* __LIBBUSYBOX_H__ */
|
#endif /* __LIBBUSYBOX_H__ */
|
||||||
|
@ -9,28 +9,22 @@
|
|||||||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "busybox.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <netdb.h>
|
|
||||||
|
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
|
||||||
#include "busybox.h"
|
|
||||||
|
|
||||||
#define IDENT_PORT 113
|
#define IDENT_PORT 113
|
||||||
#define MAXCONNS 20
|
#define MAXCONNS 20
|
||||||
|
@ -8,17 +8,17 @@
|
|||||||
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "busybox.h"
|
||||||
|
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <netinet/ether.h>
|
#include <netinet/ether.h>
|
||||||
|
|
||||||
#include "busybox.h"
|
|
||||||
|
|
||||||
/* Older versions of net/if.h do not appear to define IF_NAMESIZE. */
|
/* Older versions of net/if.h do not appear to define IF_NAMESIZE. */
|
||||||
#ifndef IF_NAMESIZE
|
#ifndef IF_NAMESIZE
|
||||||
|
Loading…
Reference in New Issue
Block a user