# HG changeset patch
# Parent  366997036822b0decb2ba802e189df2d725fe451

diff -r 366997036822 python/mozbuild/mozpack/executables.py
--- a/python/mozbuild/mozpack/executables.py	Tue May 12 08:29:13 2020 +0200
+++ b/python/mozbuild/mozpack/executables.py	Tue May 12 08:42:13 2020 +0200
@@ -2,7 +2,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-from __future__ import absolute_import, print_function, unicode_literals
+#from __future__ import absolute_import, print_function, unicode_literals
+from __future__ import absolute_import, print_function
 
 import os
 import struct
diff -r 366997036822 remote/mach_commands.py
--- a/remote/mach_commands.py	Tue May 12 08:29:13 2020 +0200
+++ b/remote/mach_commands.py	Tue May 12 08:42:13 2020 +0200
@@ -33,7 +33,6 @@
 )
 from mozbuild import nodeutil
 import mozlog
-import mozprofile
 
 
 EX_CONFIG = 78
@@ -327,6 +326,7 @@
         env["HEADLESS"] = str(params.get("headless", False))
 
         prefs = {}
+        import mozprofile
         for k, v in params.get("extra_prefs", {}).items():
             prefs[k] = mozprofile.Preferences.cast(v)
 
diff -r 366997036822 toolkit/system/unixproxy/nsLibProxySettings.cpp
--- a/toolkit/system/unixproxy/nsLibProxySettings.cpp	Tue May 12 08:29:13 2020 +0200
+++ b/toolkit/system/unixproxy/nsLibProxySettings.cpp	Tue May 12 08:42:13 2020 +0200
@@ -57,7 +57,7 @@
 
   char** proxyArray = nullptr;
   proxyArray = px_proxy_factory_get_proxies(mProxyFactory,
-                                            PromiseFlatCString(aSpec).get());
+                                            (char*)PromiseFlatCString(aSpec).get());
   NS_ENSURE_TRUE(proxyArray, NS_ERROR_NOT_AVAILABLE);
 
   // Translate libproxy's output to PAC string as expected
diff -r 366997036822 xpcom/threads/nsThread.cpp
--- a/xpcom/threads/nsThread.cpp	Tue May 12 08:29:13 2020 +0200
+++ b/xpcom/threads/nsThread.cpp	Tue May 12 08:42:13 2020 +0200
@@ -569,7 +569,12 @@
     // kernel report them as separate regions, even when they are adjacent to
     // heap memory. This allows us to accurately track the actual memory
     // consumption of our allocated stacks.
+
+// On SLE-11 SP1, this macro is not available. We don't really need to "accurately track memory consumption"
+// so hopefully deactivating that is ok
+#if defined(MADV_NOHUGEPAGE)
     madvise(mStackBase, stackSize, MADV_NOHUGEPAGE);
+#endif
 
     pthread_attr_destroy(&attr);
 #elif defined(XP_WIN)
diff -r 1c8adaff15d9 media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
--- a/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc	Thu Jun 04 15:10:19 2020 +0200
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc	Fri Jun 05 10:27:03 2020 +0200
@@ -207,7 +207,10 @@
     sprintf(device, "/dev/video%d", n);
     if ((fd = open(device, O_RDONLY)) != -1) {
       // query device capabilities and make sure this is a video capture device
-      if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !(cap.device_caps & V4L2_CAP_VIDEO_CAPTURE)) {
+      // NOTE: glibc-devel in SLE-11 is too old and thus cap does not have the member
+      //       cap.device_caps. Thus we switch to cap.capabilities, which should be
+      //       ok for deciding if the device has recording capabilities
+      if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
         close(fd);
         continue;
       }
@@ -241,7 +244,7 @@
     sprintf(device, "/dev/video%d", device_index);
     if ((fd = open(device, O_RDONLY)) != -1) {
       // query device capabilities and make sure this is a video capture device
-      if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !(cap.device_caps & V4L2_CAP_VIDEO_CAPTURE)) {
+      if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
         close(fd);
         continue;
       }
@@ -328,7 +331,7 @@
     struct v4l2_capability cap;
     if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0) {
       // skip devices without video capture capability
-      if (!(cap.device_caps & V4L2_CAP_VIDEO_CAPTURE)) {
+      if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
         continue;
       }
 
