- Timestamp:
- Dec 7, 2011, 9:23:01 PM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_log_parse_pacct.c
r292 r384 225 225 } 226 226 227 /* This looks strange, but it's real ANSI C. */228 extern struct acct pacct_rd_never_used;229 #define COMM_LEN ((int) sizeof (pacct_rd_never_used.ac_comm))230 231 sh_string * sh_read_pacct (sh_string * record, struct sh_logfile * logfile)232 {233 227 #if defined(__linux__) && defined(HAVE_ACCT_V3) 234 228 # define STRUCT_ACCT struct acct_v3 229 #elif defined(__FreeBSD__) && defined(HAVE_ACCTV2) 230 # define STRUCT_ACCT struct acctv2 235 231 #else 236 232 # define STRUCT_ACCT struct acct 237 233 #endif 238 234 235 /* This looks strange, but it's real ANSI C. */ 236 extern STRUCT_ACCT pacct_rd_never_used; 237 #define COMM_LEN ((int) sizeof (pacct_rd_never_used.ac_comm)) 238 239 sh_string * sh_read_pacct (sh_string * record, struct sh_logfile * logfile) 240 { 239 241 STRUCT_ACCT rec; 240 242 … … 249 251 char out[64+COMM_LEN+1+5+8+8+32+4+19+7]; /* see printf format below */ 250 252 251 expand_flags(rec.ac_flag, fl); 253 #if defined(ac_flagx) 254 expand_flags(rec.ac_flagx, fl); 255 #else 256 expand_flags(rec.ac_flag, fl); 257 #endif 252 258 253 259 /* ac_comm may not be null terminated -
trunk/src/sh_port2proc.c
r315 r384 802 802 continue; 803 803 } else if (inp->inp_vflag & INP_IPV6) { 804 #ifndef in6p_fport 805 #define in6p_fport inp_fport 806 #endif 804 807 if ((inp->in6p_fport == 0 && !opt_l) || 805 808 (inp->in6p_fport != 0 && !opt_c)) … … 822 825 memset(sock, '\0', sizeof (*sock)); 823 826 827 #ifndef in6p_lport 828 #define in6p_lport inp_lport 829 #endif 824 830 sock->socket = so->xso_so; 825 831 sock->proto = proto; … … 917 923 int n, hash; 918 924 struct xfile *xf; 919 struct in_addr * haddr ;920 struct in6_addr * haddr6 ;925 struct in_addr * haddr = NULL; 926 struct in6_addr * haddr6 = NULL; 921 927 struct sock * s; 922 928 struct in6_addr anyaddr = IN6ADDR_ANY_INIT; -
trunk/src/sh_processcheck.c
r383 r384 27 27 #include "config_xor.h" 28 28 29 #define _XOPEN_SOURCE 500 29 /* changed from 500 to 600 b/o FreeBSD (see sys/cdefs.h) 30 * which needs _POSIX_C_SOURCE >= 200112 for lstat() 31 */ 32 #define _XOPEN_SOURCE 600 30 33 31 34 #include <stdio.h> … … 34 37 #include <string.h> 35 38 #include <sys/types.h> 39 #include <sys/stat.h> 36 40 #include <dirent.h> 37 #include <sys/stat.h>38 41 #include <signal.h> 39 42 #include <unistd.h>
Note:
See TracChangeset
for help on using the changeset viewer.