openbsd-ports/devel/droplet/patches/patch-libdroplet_src_utils_c
jasper 1f4c927cd7 import droplet 1.1
Scality Droplet is a high perfomance Cloud Storage client library providing
a set of high-level features. It is open source and released under the BSD
License. Multiple backends are supported: S3 (Simple Storage Service), CDMI
(Cloud Data Management Interface), SRWS (Scality Simple Rest Web Service).
On-the-fly encryption/decryption and buffered I/O are also supported.

    initial port from Vadim Zhukov
	tweaks by me and sthen@, ok sthen@
2011-12-23 13:10:30 +00:00

37 lines
766 B
Plaintext

$OpenBSD: patch-libdroplet_src_utils_c,v 1.1.1.1 2011/12/23 13:10:30 jasper Exp $
--- libdroplet/src/utils.c.orig Fri Dec 16 13:57:00 2011
+++ libdroplet/src/utils.c Fri Dec 16 13:58:47 2011
@@ -72,6 +72,14 @@ gettid()
{
return syscall(SYS_gettid);
}
+#elif defined(__OpenBSD__)
+#include <sys/syscall.h>
+#include <unistd.h>
+pid_t
+gettid()
+{
+ return syscall(SYS_getpid);
+}
#else
#include <syscall.h>
@@ -110,6 +118,17 @@ linux_gethostbyname_r(const char *name,
return 0;
#elif defined(__APPLE__) && defined(__MACH__) || defined(__ellcc__ )
+
+ struct hostent *resultp;
+
+ resultp = gethostbyname(name);
+ if (NULL == resultp)
+ return 1;
+
+ *result = resultp;
+
+ return 0;
+#elif defined(__OpenBSD__)
struct hostent *resultp;