pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Clean up NetBSD patches



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Sun May 15 21:49:11 2016 -0500
Changeset:	5733262c659101b3e590420015c33b463ad07c71

Modified Files:
	slurm/distinfo
	slurm/patches/patch-src_common_callerid.c
	slurm/patches/patch-src_common_gres.c

Log Message:
Clean up NetBSD patches

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5733262c659101b3e590420015c33b463ad07c71

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 slurm/distinfo                            |  4 ++--
 slurm/patches/patch-src_common_callerid.c | 23 ++++++++++++-----------
 slurm/patches/patch-src_common_gres.c     | 30 ++++++++++++++++++------------
 3 files changed, 32 insertions(+), 25 deletions(-)

diffs:
diff --git a/slurm/distinfo b/slurm/distinfo
index 0eefe5b..9fd4484 100644
--- a/slurm/distinfo
+++ b/slurm/distinfo
@@ -5,8 +5,8 @@ RMD160 (slurm-15.08.11.tar.bz2) = 73100156c355ac2a05a70efcf00b949276438b77
 SHA512 (slurm-15.08.11.tar.bz2) = f152893fc1c8f54120d886c81d1651545c79cc67606608b871d2c5a7e6c396deb59a7573a61e2a73fd9b9742e3ac5d53ab4db69b8b1e6a533a26b02e5e733b33
 Size (slurm-15.08.11.tar.bz2) = 5870156 bytes
 SHA1 (patch-etc_init.d.slurm.in) = 0c779048fad16cb2de4abbe078a967a99fe0321f
-SHA1 (patch-src_common_callerid.c) = 5b8f75e8bfa51c3f5edff7a8398190df719453c9
-SHA1 (patch-src_common_gres.c) = 0bee6fa5fcec6285a5c42d318c26590e1f0c7951
+SHA1 (patch-src_common_callerid.c) = 4617892b0ba5c9f576708f4454708ea1ad1f5e59
+SHA1 (patch-src_common_gres.c) = 0f2d7cce6dd6063f98894f08f6cdbaa3a09d856e
 SHA1 (patch-src_plugins_burst__buffer_common_burst__buffer__common.c) = 64739577cc3567601eb4a9531554b6d9468f6210
 SHA1 (patch-src_plugins_power_common_power__common.c) = e95ea1a3825fbe68d44e571174ef2eddd0040a7b
 SHA1 (patch-src_plugins_switch_generic_switch__generic.c) = 877ace2fbc2f7d6747438ac0c32a6b5b902fd70f
diff --git a/slurm/patches/patch-src_common_callerid.c b/slurm/patches/patch-src_common_callerid.c
index 9a311dc..038a108 100644
--- a/slurm/patches/patch-src_common_callerid.c
+++ b/slurm/patches/patch-src_common_callerid.c
@@ -1,18 +1,19 @@
 $NetBSD$
 
-# Macros only provided for kernel in in6.h
 --- src/common/callerid.c.orig	2016-05-03 22:41:59.000000000 +0000
 +++ src/common/callerid.c
-@@ -61,6 +61,12 @@
- #define s6_addr32 __u6_addr.__u6_addr32
- #endif
- 
-+#ifdef __NetBSD__
-+#define s6_addr8  __u6_addr.__u6_addr8
-+#define s6_addr16 __u6_addr.__u6_addr16
-+#define s6_addr32 __u6_addr.__u6_addr32
+@@ -58,6 +58,14 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
 +#endif
 +
- #if HAVE_DIRENT_H
- #  include <dirent.h>
++/*
++ * FIXME: In in6.h, s6_addr32 def is guarded by #ifdef _KERNEL
++ * Is there a portable interface that could be used instead of accessing
++ * structure members directly?
++ */
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #define s6_addr32 __u6_addr.__u6_addr32
  #endif
+ 
diff --git a/slurm/patches/patch-src_common_gres.c b/slurm/patches/patch-src_common_gres.c
index d30eb68..917a950 100644
--- a/slurm/patches/patch-src_common_gres.c
+++ b/slurm/patches/patch-src_common_gres.c
@@ -1,27 +1,33 @@
 $NetBSD$
 
-# Linux compatibility
+# Linux compatiblity
 --- src/common/gres.c.orig	2016-05-03 22:41:59.000000000 +0000
 +++ src/common/gres.c
-@@ -79,6 +79,21 @@ typedef cpuset_t cpu_set_t;
+@@ -79,6 +79,14 @@ typedef cpuset_t cpu_set_t;
  #include <sys/stat.h>
  #include <math.h>
  
++// Linux compat layer for _get_usable_gres()
 +#ifdef __NetBSD__
-+#define CPU_ZERO(p) cpuset_zero((p))
-+#define CPU_ISSET(i,c) cpuset_isset((i),(c))
++#define CPU_ZERO(c) cpuset_zero(*(c))
++#define CPU_ISSET(i,c) cpuset_isset((i),*(c))
 +#define sched_getaffinity sched_getaffinity_np
 +#define SCHED_GETAFFINITY_THREE_ARGS
-+
-+// From /usr/src/common/lib/libc/sys/cpuset.c
-+struct _cpuset {
-+       uint32_t        bits[0];
-+};
-+
-+// Must come after #include <sched.h>
-+typedef cpuset_t cpu_set_t;
 +#endif
 +
  #include "slurm/slurm.h"
  #include "slurm/slurm_errno.h"
  #include "src/common/bitstring.h"
+@@ -5591,7 +5599,12 @@ extern uint64_t gres_plugin_step_count(L
+  * which are available from the CPUs current allocated to this process */
+ static bitstr_t * _get_usable_gres(int context_inx)
+ {
++#ifdef __NetBSD__
++	// On NetBSD, cpuset_t is an opaque data type
++	cpuset_t *mask = cpuset_create();
++#else
+ 	cpu_set_t mask;
++#endif
+ 	bitstr_t *usable_gres = NULL;
+ 	int i, i_last, rc;
+ 	ListIterator iter;


Home | Main Index | Thread Index | Old Index