pkgsrc-WIP-changes archive

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

Add comment to NetBSD patch



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Sun May 15 21:52:48 2016 -0500
Changeset:	5d2b18a3a46db31f1489919c3a05f499e19b2432

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

Log Message:
Add comment to NetBSD patch

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

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

diffstat:
 slurm-devel/patches/patch-src_common_callerid.c | 24 +++++++++++---------
 slurm-devel/patches/patch-src_common_gres.c     | 30 +++++++++++++++----------
 slurm/distinfo                                  |  2 +-
 slurm/patches/patch-src_common_callerid.c       |  1 +
 4 files changed, 33 insertions(+), 24 deletions(-)

diffs:
diff --git a/slurm-devel/patches/patch-src_common_callerid.c b/slurm-devel/patches/patch-src_common_callerid.c
index 9a311dc..68a71ca 100644
--- a/slurm-devel/patches/patch-src_common_callerid.c
+++ b/slurm-devel/patches/patch-src_common_callerid.c
@@ -1,18 +1,20 @@
 $NetBSD$
 
-# Macros only provided for kernel in in6.h
+# Hack to allow access to opaque structure members
 --- 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-devel/patches/patch-src_common_gres.c b/slurm-devel/patches/patch-src_common_gres.c
index d30eb68..917a950 100644
--- a/slurm-devel/patches/patch-src_common_gres.c
+++ b/slurm-devel/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;
diff --git a/slurm/distinfo b/slurm/distinfo
index 9fd4484..6fcc7f2 100644
--- a/slurm/distinfo
+++ b/slurm/distinfo
@@ -5,7 +5,7 @@ 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) = 4617892b0ba5c9f576708f4454708ea1ad1f5e59
+SHA1 (patch-src_common_callerid.c) = caea5b2d428435285ec66f00624fcac812d1b141
 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
diff --git a/slurm/patches/patch-src_common_callerid.c b/slurm/patches/patch-src_common_callerid.c
index 038a108..68a71ca 100644
--- a/slurm/patches/patch-src_common_callerid.c
+++ b/slurm/patches/patch-src_common_callerid.c
@@ -1,5 +1,6 @@
 $NetBSD$
 
+# Hack to allow access to opaque structure members
 --- src/common/callerid.c.orig	2016-05-03 22:41:59.000000000 +0000
 +++ src/common/callerid.c
 @@ -58,6 +58,14 @@


Home | Main Index | Thread Index | Old Index