pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib MesaLib: resolve a build failure on S...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/06ce66637237
branches:  trunk
changeset: 400218:06ce66637237
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Aug 24 20:11:19 2019 +0000

description:
MesaLib: resolve a build failure on SunOS, reported by wilbury

diffstat:

 graphics/MesaLib/distinfo                                 |   3 +-
 graphics/MesaLib/patches/patch-src_intel_perf_gen__perf.c |  56 +++++++++++++++
 2 files changed, 58 insertions(+), 1 deletions(-)

diffs (77 lines):

diff -r 6a8997b1f348 -r 06ce66637237 graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Sat Aug 24 20:01:01 2019 +0000
+++ b/graphics/MesaLib/distinfo Sat Aug 24 20:11:19 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.126 2019/08/23 07:05:18 tnn Exp $
+$NetBSD: distinfo,v 1.127 2019/08/24 20:11:19 nia Exp $
 
 SHA1 (mesa-19.1.4.tar.xz) = 393053bfa41b7fc65add756713004f034c39c3ce
 RMD160 (mesa-19.1.4.tar.xz) = 1d813c4a212710bb6fa8db184b4618788851cd15
@@ -30,6 +30,7 @@
 SHA1 (patch-src_glx_glxext.c) = 15c2c5e0c6b5095ce849fb86ad148aa05d7d907a
 SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd08699921bec4e20202a17478
 SHA1 (patch-src_intel_isl_isl__tiled__memcpy.c) = 9b79991648ab4c39ae14df219135cd2b01c1b3c0
+SHA1 (patch-src_intel_perf_gen__perf.c) = 526f36d96bd9d72893764da2b9e78cb9b70de92b
 SHA1 (patch-src_intel_perf_gen__perf.h) = cbc9c8efe6ce127b8dcb9f2c733d3427f114c5c0
 SHA1 (patch-src_intel_tools_aub__mem.c) = 6a21ecb4cfbdf216474b3be16bda441bb1390350
 SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa
diff -r 6a8997b1f348 -r 06ce66637237 graphics/MesaLib/patches/patch-src_intel_perf_gen__perf.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/patches/patch-src_intel_perf_gen__perf.c Sat Aug 24 20:11:19 2019 +0000
@@ -0,0 +1,56 @@
+$NetBSD: patch-src_intel_perf_gen__perf.c,v 1.1 2019/08/24 20:11:19 nia Exp $
+
+SunOS does not have d_type in DIR structure.
+
+--- src/intel/perf/gen_perf.c.orig     2019-08-07 16:39:17.000000000 +0000
++++ src/intel/perf/gen_perf.c
+@@ -48,6 +48,9 @@ get_sysfs_dev_dir(struct gen_perf *perf,
+    DIR *drmdir;
+    struct dirent *drm_entry;
+    int len;
++#ifdef __sun
++   struct stat s;
++#endif
+ 
+    perf->sysfs_dev_dir[0] = '\0';
+ 
+@@ -79,8 +82,14 @@ get_sysfs_dev_dir(struct gen_perf *perf,
+    }
+ 
+    while ((drm_entry = readdir(drmdir))) {
++#ifdef __sun
++      stat(drm_entry->d_name, &s);
++      if ((s.st_mode == S_IFDIR ||
++           s.st_mode == S_IFLNK) &&
++#else
+       if ((drm_entry->d_type == DT_DIR ||
+            drm_entry->d_type == DT_LNK) &&
++#endif
+           strncmp(drm_entry->d_name, "card", 4) == 0)
+       {
+          len = snprintf(perf->sysfs_dev_dir,
+@@ -162,6 +171,9 @@ enumerate_sysfs_metrics(struct gen_perf 
+    struct dirent *metric_entry;
+    char buf[256];
+    int len;
++#ifdef __sun
++   struct stat s;
++#endif
+ 
+    len = snprintf(buf, sizeof(buf), "%s/metrics", perf->sysfs_dev_dir);
+    if (len < 0 || len >= sizeof(buf)) {
+@@ -178,8 +190,14 @@ enumerate_sysfs_metrics(struct gen_perf 
+    while ((metric_entry = readdir(metricsdir))) {
+       struct hash_entry *entry;
+ 
++#ifdef __sun
++      stat(metric_entry->d_name, &s);
++      if ((s.st_mode != S_IFDIR &&
++           s.st_mode != S_IFLNK) ||
++#else
+       if ((metric_entry->d_type != DT_DIR &&
+            metric_entry->d_type != DT_LNK) ||
++#endif
+           metric_entry->d_name[0] == '.')
+          continue;
+ 



Home | Main Index | Thread Index | Old Index