]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test-utils-glib.c: Avoid using a non-portable errno value
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 8 Aug 2022 19:49:40 +0000 (19:49 +0000)
committerSimon McVittie <smcv@collabora.com>
Wed, 10 Aug 2022 11:18:20 +0000 (11:18 +0000)
ENODATA is not available on FreeBSD. Since the actual errno value here
does not matter, use EPERM instead.
This fixes the DBus build on FreeBSD.

test/test-utils-glib.c

index bcd83d111f59282d2c36606b0497b363bab8353f..c6383af55448d0176321c07214392f6b83f2e323 100644 (file)
@@ -91,7 +91,7 @@ can_become_user_or_skip (uid_t uid)
         {
           /* make sure we report failure even if errno is wrong */
           if (errno == 0)
-            errno = ENODATA;
+            errno = EPERM;
 
           _exit (errno);
         }