mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
112 lines
2.8 KiB
Plaintext
112 lines
2.8 KiB
Plaintext
From fe03c14a356c1254a3e99fa14d2ebedfb8d9de31 Mon Sep 17 00:00:00 2001
|
|
From: Sergei Reznikov <diver@gelios.net>
|
|
Date: Fri, 11 Apr 2014 15:46:09 +0400
|
|
Subject: settimeofday is not implemented on Haiku
|
|
|
|
|
|
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c
|
|
index f58d62b..cfc3ab3 100644
|
|
--- a/source3/utils/net_time.c
|
|
+++ b/source3/utils/net_time.c
|
|
@@ -104,6 +104,14 @@ int net_time_usage(struct net_context *c, int argc, const char **argv)
|
|
return -1;
|
|
}
|
|
|
|
+#ifdef __HAIKU__
|
|
+int settimeofday(struct timeval *tv, struct timezone *tz)
|
|
+{
|
|
+set_real_time_clock(tv->tv_sec);
|
|
+return(0);
|
|
+}
|
|
+#endif //__HAIKU__
|
|
+
|
|
/* try to set the system clock */
|
|
static int net_time_set(struct net_context *c, int argc, const char **argv)
|
|
{
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From adac605196ceba506790030a459c722c3bb9f47c Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Wed, 11 Oct 2017 20:20:42 +0200
|
|
Subject: Haiku has only a typedef for uchar.
|
|
|
|
|
|
diff --git a/source3/include/includes.h b/source3/include/includes.h
|
|
index ee05b93..f1918aa 100644
|
|
--- a/source3/include/includes.h
|
|
+++ b/source3/include/includes.h
|
|
@@ -119,7 +119,7 @@ typedef sig_atomic_t SIG_ATOMIC_T;
|
|
typedef sig_atomic_t volatile SIG_ATOMIC_T;
|
|
#endif
|
|
|
|
-#ifndef uchar
|
|
+#if !defined(uchar) && !defined(__HAIKU__)
|
|
#define uchar unsigned char
|
|
#endif
|
|
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From f2fd036870ab0b65d41e4462c70670dfc130f8b4 Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sun, 22 Nov 2020 15:39:52 +0000
|
|
Subject: Fix conflicting int types for 32bit Haiku
|
|
|
|
|
|
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
|
|
index a6a2b40..e66d26d 100644
|
|
--- a/lib/replace/replace.h
|
|
+++ b/lib/replace/replace.h
|
|
@@ -82,6 +82,9 @@
|
|
#endif
|
|
|
|
/* Decimal notation. */
|
|
+#if defined(__HAIKU__)
|
|
+#include <SupportDefs.h>
|
|
+#else
|
|
#ifndef PRId8
|
|
# define PRId8 "d"
|
|
#endif
|
|
@@ -94,6 +97,7 @@
|
|
#ifndef PRId64
|
|
# define PRId64 __PRI64_PREFIX "d"
|
|
#endif
|
|
+#endif
|
|
|
|
#ifndef PRIi8
|
|
# define PRIi8 "i"
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From be637f19aa799bfa9a3830c70413e97f2a2b66ad Mon Sep 17 00:00:00 2001
|
|
From: Schrijvers Luc <begasus@gmail.com>
|
|
Date: Fri, 12 Jul 2024 17:28:28 +0200
|
|
Subject: Replacement for major/minor/makedev.
|
|
|
|
|
|
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
|
|
index cc1b4d4..30420c6 100644
|
|
--- a/source3/libsmb/clifile.c
|
|
+++ b/source3/libsmb/clifile.c
|
|
@@ -864,6 +864,13 @@ static void cli_posix_stat_done(struct tevent_req *subreq)
|
|
sbuf->st_ex_gid = (gid_t) IVAL(data, 48); /* group ID of owner */
|
|
sbuf->st_ex_mode = unix_filetype_from_wire(IVAL(data, 56));
|
|
|
|
+#if !defined(HAVE_MAJOR) && !defined(major)
|
|
+/* Replacement for major/minor/makedev. */
|
|
+#define major(x) ((int)(0x00ff & ((x) >> 8)))
|
|
+#define minor(x) ((int)(0xffff00ff & (x)))
|
|
+#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min)))
|
|
+#endif
|
|
+
|
|
#if defined(HAVE_MAKEDEV)
|
|
{
|
|
uint32_t dev_major = IVAL(data,60);
|
|
--
|
|
2.45.2
|
|
|