openbsd-ports/net/ptpd/patches/patch-src_dep_ptpd_dep_h
2012-06-25 19:24:27 +00:00

31 lines
919 B
Plaintext

$OpenBSD: patch-src_dep_ptpd_dep_h,v 1.2 2012/06/25 19:24:27 naddy Exp $
--- src/dep/ptpd_dep.h.orig Mon Apr 2 15:57:44 2007
+++ src/dep/ptpd_dep.h Mon Jun 25 13:23:06 2012
@@ -3,6 +3,7 @@
#ifndef PTPD_DEP_H
#define PTPD_DEP_H
+#include<limits.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
@@ -13,7 +14,9 @@
#include<sys/stat.h>
#include<time.h>
#include<sys/time.h>
+#if !defined(__OpenBSD__)
#include<sys/timex.h>
+#endif
#include<sys/socket.h>
#include<sys/select.h>
#include<sys/ioctl.h>
@@ -22,7 +25,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 */