chiark / gitweb /
tree-wide: add new SIGNAL_VALID() macro-like function that validates signal numbers
[elogind.git] / src / basic / hostname-util.c
index b3d79c5a83f1aac516fa6e3daabd03be10b8d071..3bd3a4d7b3634a4d4175600a6a639a828aed5265 100644 (file)
@@ -17,7 +17,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <bits/local_lim.h>
+#if defined(__GLIBC__)
+# include <bits/local_lim.h>
+#endif // defined(__GLIBC__)
 #include <errno.h>
 #include <limits.h>
 #include <stdio.h>
@@ -98,7 +100,7 @@ bool hostname_is_valid(const char *s, bool allow_trailing_dot) {
                                 return false;
 
                         dot = true;
-                        n_dots ++;
+                        n_dots++;
                 } else {
                         if (!hostname_valid_char(*p))
                                 return false;