bug-mailfromd


Search for: Advanced

Re: [Bug-mailfromd] Undefined symbol timersub when compiling mailfromd-7.0 on Solaris 10


Zhang, Anchi <Anchi.Zhang@xxxxxxxxx> ha escrit:

>    Getting the same errors compiling mailfromd-6.0.1 and mailfromd-7.0.

For 7.0, apply the attached patch.

Regards,
Sergey

diff --git a/gacopyz/gacopyz_priv.h b/gacopyz/gacopyz_priv.h
index 6aa34fe..15e1480 100644
--- a/gacopyz/gacopyz_priv.h
+++ b/gacopyz/gacopyz_priv.h
@@ -75,6 +75,18 @@ void (*__gacopyz_log_printer)(int, char *, va_list);
 #define GACOPYZ_CONN_LOG_MATCH(conn, level) \
   GACOPYZ_DESC_LOG_MATCH(&(conn)->desc, level)
 
+
+#ifndef timersub
+# define timersub(a, b, result)						\
+	do {								\
+		(result)->tv_sec = (a)->tv_sec - (b)->tv_sec;		\
+		(result)->tv_usec = (a)->tv_usec - (b)->tv_usec;        \
+		if ((result)->tv_usec < 0) {                            \
+			--(result)->tv_sec;				\
+			(result)->tv_usec += 1000000;			\
+		}                                                       \
+	} while (0)
+#endif