]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus: move _DBUS_MAX_SUN_PATH_LENGTH to sysdeps.h
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 8 Feb 2022 10:25:08 +0000 (14:25 +0400)
committerSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 15:26:18 +0000 (16:26 +0100)
Share the same constant for all systems.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps.h

index fc0a47779563faf2b7477f70bcee14eee529520e..18bd128282e1b2119719e2540a71bdf5117880a4 100644 (file)
@@ -935,21 +935,6 @@ _dbus_write_two (int               fd,
 #endif /* !HAVE_WRITEV */
 }
 
-#define _DBUS_MAX_SUN_PATH_LENGTH 99
-
-/**
- * @def _DBUS_MAX_SUN_PATH_LENGTH
- *
- * Maximum length of the path to a UNIX domain socket,
- * sockaddr_un::sun_path member. POSIX requires that all systems
- * support at least 100 bytes here, including the nul termination.
- * We use 99 for the max value to allow for the nul.
- *
- * We could probably also do sizeof (addr.sun_path)
- * but this way we are the same on all platforms
- * which is probably a good idea.
- */
-
 /**
  * Creates a socket and connects it to the UNIX domain socket at the
  * given path.  The connection fd is returned, and is set up as
index 1c6b76153723604dbaa9046f60eec8d5e223e95c..5270a5dec11af31fc6b0edcf09c9abdf03038d93 100644 (file)
@@ -730,6 +730,20 @@ void _dbus_combine_tcp_errors (DBusList **sources,
                                const char *port,
                                DBusError *dest);
 
+/**
+ * @def _DBUS_MAX_SUN_PATH_LENGTH
+ *
+ * Maximum length of the path to a UNIX domain socket,
+ * sockaddr_un::sun_path member. POSIX requires that all systems
+ * support at least 100 bytes here, including the nul termination.
+ * We use 99 for the max value to allow for the nul.
+ *
+ * We could probably also do sizeof (addr.sun_path)
+ * but this way we are the same on all platforms
+ * which is probably a good idea.
+ */
+#define _DBUS_MAX_SUN_PATH_LENGTH 99
+
 /** @} */
 
 DBUS_END_DECLS