# need to restore original newsyslog



## scottemick (Jun 20, 2011)

I downloaded newsyslog-1.2rc1 from newsyslog.org, compiled it, and have been trying to use it on 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 08:43:30 UTC 2007, but found that it didn't recognize the G flag, and some other flags that I need in my newsyslog.conf file. 

I removed the original newsyslog.conf excutable and manpages, and tried to compile the original newsyslog from the /usr/src/usr.sbin/newsyslog directory, but I get an error:

```
Warning: Object directory not changed from original /usr/src/usr.sbin/newsyslog
cc -O2 -fno-strict-aliasing -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
 -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter
 -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c newsyslog.c
newsyslog.c: In function `expand_globs':
newsyslog.c:961: warning: comparison between signed and unsigned
newsyslog.c: In function `parse_file':
newsyslog.c:1089: warning: comparison between signed and unsigned
newsyslog.c: In function `delete_oldest_timelog':
newsyslog.c:1541: warning: implicit declaration of function `unlinkat'
newsyslog.c:1541: warning: nested extern declaration of `unlinkat'
*** Error code 1
```
So I'm stuck. I either need to get my original, or a newer version that supports the G flag in the configuration file.

Any help greatly appreciated.

When I do get back the original I am going to modify the source so it sleeps for a minute or two before compressing the log files since I am using signal USR1 (30) to restart my Apache which is supposed to be a graceful restart.


----------



## scottemick (Jun 20, 2011)

*Solved*

Sorry about not formatting the output...

I did get everything working, I had to grab the source code from FreeBSD version 7 and compile that.  I guess the unlinkat() function - which is in version 8's source code - doesn't show up until FreeBSD version 8.


----------

