diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-01-28 14:29:26 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-01-28 14:30:13 +0100 |
commit | caa03bd0b43a89dcc93397182dc969417f09ba7c (patch) | |
tree | 6edd590b3f9afaee9f72a4e2c44a241e07b0f494 | |
parent | eeed21e84c1702e4b6c6c8ccbef5b245dd9daa25 (diff) | |
download | outils-caa03bd0b43a89dcc93397182dc969417f09ba7c.tar.gz outils-caa03bd0b43a89dcc93397182dc969417f09ba7c.tar.xz outils-caa03bd0b43a89dcc93397182dc969417f09ba7c.zip |
hook up rdate
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | src/liboutils/outils.h | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile index 4f6a277..e8cf890 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ CFLAGS=-Wall -O2 -CPPFLAGS=-include src/liboutils/outils.h -isystem src/liboutils/include -Isrc/bin/md5 -D_GNU_SOURCE -D_DEFAULT_SOURCE +CPPFLAGS=-include src/liboutils/outils.h -isystem src/liboutils/include -Isrc/bin/md5 -D_GNU_SOURCE -D_DEFAULT_SOURCE -DNO_UTIL LDFLAGS=-Wl,--as-needed -lcrypto %: %.o $(CC) -o $@ $^ $(LDFLAGS) -ALL=src/usr.bin/apply/apply src/usr.bin/jot/jot src/usr.bin/lam/lam src/usr.bin/lndir/lndir src/bin/md5/md5 src/usr.bin/rs/rs src/usr.bin/gzsig/gzsig src/usr.bin/signify/signify src/usr.bin/calendar/calendar src/usr.bin/vis/vis src/usr.bin/unvis/unvis +ALL=src/usr.bin/apply/apply src/usr.bin/jot/jot src/usr.bin/lam/lam src/usr.bin/lndir/lndir src/bin/md5/md5 src/usr.bin/rs/rs src/usr.bin/gzsig/gzsig src/usr.bin/signify/signify src/usr.bin/calendar/calendar src/usr.bin/vis/vis src/usr.bin/unvis/unvis src/usr.sbin/rdate/rdate all: $(ALL) src/usr.bin/apply/apply: src/usr.bin/apply/apply.o src/liboutils/strlcpy.o @@ -30,6 +30,8 @@ src/usr.bin/vis/vis: src/usr.bin/vis/vis.o src/usr.bin/vis/foldit.o src/liboutil src/usr.bin/unvis/unvis: src/usr.bin/unvis/unvis.o src/liboutils/unvis.o +src/usr.sbin/rdate/rdate: src/usr.sbin/rdate/ntp.o src/usr.sbin/rdate/rfc868time.o src/usr.sbin/rdate/rdate.o src/usr.sbin/rdate/ntpleaps.o src/liboutils/arc4random.o src/liboutils/reallocarray.c src/liboutils/getentropy_linux.o src/liboutils/explicit_bzero.o + clean: rm -f src/*/*/*.o @@ -44,6 +46,7 @@ install: all ln -sf md5 $(DESTDIR)$(PREFIX)/bin/sha512 ln -sf md5 $(DESTDIR)$(PREFIX)/bin/cksum install -m644 src/*/*/*.1 $(DESTDIR)$(PREFIX)/share/man/man1 + install -m644 src/*/*/*.8 $(DESTDIR)$(PREFIX)/share/man/man8 ln -sf md5.1 $(DESTDIR)$(PREFIX)/share/man/man1/sha1.1 ln -sf md5.1 $(DESTDIR)$(PREFIX)/share/man/man1/sha256.1 ln -sf md5.1 $(DESTDIR)$(PREFIX)/share/man/man1/sha512.1 diff --git a/README b/README index c4cfb4d..3a1b1b7 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ Included are: lam — laminate files lndir — create a shadow directory of symbolic links to another directory md5 — calculate a message digest (checksum) for a file + rdate — set the system's date from a remote host rs — reshape a data array signify — cryptographically sign and verify files unvis — revert a visual representation of data back to original form diff --git a/src/liboutils/outils.h b/src/liboutils/outils.h index c949525..ef63a39 100644 --- a/src/liboutils/outils.h +++ b/src/liboutils/outils.h @@ -11,6 +11,12 @@ #define letoh16 le16toh +#ifndef SA_LEN +#define SA_LEN(X) \ + (((struct sockaddr*)(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) : \ + ((struct sockaddr*)(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr)) +#endif + #include <stdio.h> #include <stdint.h> |