Fix build with -fno-common
This commit is contained in:
parent
3c5db02db5
commit
c4a0bb5149
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550183
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= l0pht-watch
|
||||
PORTVERSION= 1.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= LOCAL/vs
|
||||
DISTNAME= ${PORTNAME}
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- Makefile.orig Thu Sep 23 10:18:18 1999
|
||||
+++ Makefile Tue Apr 25 00:30:11 2000
|
||||
--- Makefile.orig 1999-09-23 17:18:18 UTC
|
||||
+++ Makefile
|
||||
@@ -9,12 +9,13 @@
|
||||
# debugging
|
||||
# DFLAGS = -DTEST -DDEBUG
|
||||
@ -16,7 +16,7 @@
|
||||
LD = $(CC) -s # linker; defaults to stripped executables
|
||||
o = o # object extension
|
||||
CKTEMP_OBJS=check_tmp.o daemon.o list_utils.o usage.o
|
||||
@@ -60,7 +61,8 @@
|
||||
@@ -60,7 +61,8 @@ solaris25:
|
||||
|
||||
OpenBSD:
|
||||
make -e $(ALL) $(MFLAGS) \
|
||||
|
@ -1,21 +1,39 @@
|
||||
--- check_tmp.c.orig Fri Sep 24 15:33:35 1999
|
||||
+++ check_tmp.c Tue Jul 18 16:18:59 2000
|
||||
@@ -37,7 +37,13 @@
|
||||
--- check_tmp.c.orig 1999-09-24 20:33:35 UTC
|
||||
+++ check_tmp.c
|
||||
@@ -2,6 +2,8 @@
|
||||
directories. Ostensibly to start hammering on how bad people are on
|
||||
tmp droppings following links, etc. etc. .mudge 8.20.98 */
|
||||
|
||||
+#include <string.h>
|
||||
+
|
||||
#include "check_tmp.h"
|
||||
|
||||
void usage(char *progname);
|
||||
@@ -14,6 +16,7 @@ int checkdir(char *);
|
||||
void walklist(struct listStruct *);
|
||||
#endif
|
||||
int become_daemon(void);
|
||||
+int syslogflag;
|
||||
|
||||
int main(int argc, char **argv){
|
||||
|
||||
@@ -37,8 +40,14 @@ int main(int argc, char **argv){
|
||||
char error_buffer[256];
|
||||
#endif
|
||||
#endif
|
||||
-
|
||||
+
|
||||
|
||||
+#if (__FreeBSD_version >= 500011) || (__FreeBSD_version >= 410000 && __FreeBSD_version < 500000)
|
||||
+ struct kevent ev;
|
||||
+ int fd;
|
||||
+ struct timespec ts = { 0, 0 };
|
||||
+ int kq = -1;
|
||||
+#endif
|
||||
|
||||
+
|
||||
struct listStruct *list = NULL;
|
||||
|
||||
@@ -178,6 +184,21 @@
|
||||
syslogflag=0; /* initialize */
|
||||
@@ -178,6 +187,21 @@ int main(int argc, char **argv){
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -37,7 +55,7 @@
|
||||
/* steup the first element of the list */
|
||||
while ((dp = readdir(dirp)) != NULL){
|
||||
if (!list) /* first time */
|
||||
@@ -266,6 +287,10 @@
|
||||
@@ -266,6 +290,10 @@ int main(int argc, char **argv){
|
||||
rewinddir(dirp);
|
||||
|
||||
while (1){
|
||||
@ -48,7 +66,7 @@
|
||||
while ((dp = readdir(dirp)) != NULL){
|
||||
if (!(checknode(list, watchdir, dp->d_name))){
|
||||
if (replacewatchflag){
|
||||
@@ -352,11 +377,22 @@
|
||||
@@ -352,11 +380,22 @@ int main(int argc, char **argv){
|
||||
/* closedir(dirp); */
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- check_tmp.h.orig Thu Dec 24 10:40:13 1998
|
||||
+++ check_tmp.h Sun Aug 13 23:54:21 2000
|
||||
--- check_tmp.h.orig 1998-12-24 15:40:13 UTC
|
||||
+++ check_tmp.h
|
||||
@@ -1,16 +1,23 @@
|
||||
#ifndef __CHECK_TMP_H
|
||||
#define __CHECK_TMP_H
|
||||
@ -29,3 +29,12 @@
|
||||
|
||||
#if defined (REGEXPR_3G)
|
||||
#include <regexpr.h>
|
||||
@@ -34,7 +41,7 @@ struct listStruct {
|
||||
struct listStruct *next;
|
||||
};
|
||||
|
||||
-int syslogflag; /* grody after thought */
|
||||
+extern int syslogflag; /* grody after thought */
|
||||
|
||||
/* things to shut lint up */
|
||||
char *strrchr(const char *s, int c);
|
||||
|
@ -1,6 +1,12 @@
|
||||
--- list_utils.c.orig Thu Dec 24 00:00:44 1998
|
||||
+++ list_utils.c Sun Aug 13 23:55:23 2000
|
||||
@@ -102,9 +102,11 @@
|
||||
--- list_utils.c.orig 1998-12-24 05:00:44 UTC
|
||||
+++ list_utils.c
|
||||
@@ -1,3 +1,5 @@
|
||||
+#include <string.h>
|
||||
+
|
||||
#include "check_tmp.h"
|
||||
|
||||
static void printnode(struct listStruct *, int);
|
||||
@@ -102,9 +104,11 @@ printnode(struct listStruct *list, int action){
|
||||
char filemodes[11];
|
||||
char outputStr[(MAXNAMLEN * 2) + 256];
|
||||
char linkbuf[MAXNAMLEN + 1];
|
||||
@ -12,7 +18,7 @@
|
||||
|
||||
switch(action){
|
||||
case ADDITION:
|
||||
@@ -143,11 +145,16 @@
|
||||
@@ -143,11 +147,16 @@ printnode(struct listStruct *list, int action){
|
||||
|
||||
getfilemodes(&list->statbuf, filemodes);
|
||||
|
||||
@ -31,7 +37,7 @@
|
||||
|
||||
if (S_ISLNK(list->statbuf.st_mode) ){
|
||||
ret = readlink(list->filename, linkbuf, sizeof(linkbuf));
|
||||
@@ -168,7 +175,7 @@
|
||||
@@ -168,7 +177,7 @@ printnode(struct listStruct *list, int action){
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user