freebsd-ports/net/ptpd/files/patch-src-dep_ptpd_dep.h
Christian Weisgerber 2042b740ed * Fix out-of-bound string accesses.
* Fix %m GNUism in printf.
* Don't create the man page, it is already included.
* ptpd is not a user command, put it into sbin.
* Overhaul the startup file and move it to "ptpd".

Approved by:	gnn (maintainer)
2008-11-13 22:17:28 +00:00

11 lines
442 B
C

--- dep/ptpd_dep.h.orig
+++ dep/ptpd_dep.h
@@ -22,7 +22,7 @@
/* system messages */
#define ERROR(x, ...) fprintf(stderr, "(ptpd error) " x, ##__VA_ARGS__)
-#define PERROR(x, ...) fprintf(stderr, "(ptpd error) " x ": %m\n", ##__VA_ARGS__)
+#define PERROR(x, ...) fprintf(stderr, "(ptpd error) " x ": %s\n", ##__VA_ARGS__, strerror(errno))
#define NOTIFY(x, ...) fprintf(stderr, "(ptpd notice) " x, ##__VA_ARGS__)
/* debug messages */