$OpenBSD$

Don't have IPPORT_MAX or __DECONST.

Index: common.h
--- common.h.orig
+++ common.h
@@ -75,7 +75,7 @@ struct iovec;
 
 void		 fetch_seterr(struct fetcherr *, int);
 void		 fetch_syserr(void);
-void		 fetch_info(const char *, ...) __printflike(1, 2);
+void		 fetch_info(const char *, ...) __attribute__((__format__ (__printf__, 1, 2)));
 int		 fetch_default_port(const char *);
 int		 fetch_default_proxy_port(const char *);
 struct addrinfo *fetch_resolve(const char *, int, int);
@@ -137,5 +137,13 @@ FILE		*ftp_request(struct url *, const char *,
  * Check whether a particular flag is set
  */
 #define CHECK_FLAG(x)	(flags && strchr(flags, (x)))
+
+#ifndef IPPORT_MAX
+#define IPPORT_MAX 65535
+#endif
+
+#ifndef __DECONST
+#define __DECONST(type, var)	((type)(__uintptr_t)(const void *)(var))
+#endif
 
 #endif
