Add clang as a supported compiler. dhcpcd-ui-0.6.0
authorRoy Marples <roy@marples.name>
Mon, 6 Feb 2012 15:35:04 +0000 (15:35 +0000)
committerRoy Marples <roy@marples.name>
Mon, 6 Feb 2012 15:35:04 +0000 (15:35 +0000)
Don't show RA's for stopped interfaces.

configure
src/dhcpcd-gtk/main.c

index ba6a7b1eb2595f755696c4afa933517f46be168b..06c4ae287674d92a1cc939df89e10033e81bfbae 100755 (executable)
--- a/configure
+++ b/configure
@@ -155,7 +155,7 @@ echo "MANDIR=               ${MANDIR}" >>$CONFIG_MK
 if [ -z "$CC" ]; then
        printf "Looking for compiler ... "
        for b in $TARGET- ""; do
-               for cc in gcc pcc icc cc; do
+               for cc in gcc clang pcc icc cc; do
                        if type $b$cc >/dev/null 2>&1; then
                                CC=$b$cc
                                echo "$CC"
index 0da2030e98a0b308ed93c605634557226d8175a8..332d205be339ad1c844f417a0d0e71e9edd8741e 100644 (file)
@@ -121,9 +121,9 @@ animate_online(_unused gpointer data)
 static void
 update_online(DHCPCD_CONNECTION *con, bool showif)
 {
-       bool ison, iscarrier;
+       bool ison, iscarrier, isstop;
        char *msg, *msgs, *tmp;
-       DHCPCD_IF *ifs, *i;
+       DHCPCD_IF *ifs, *i, *j;
 
        ison = iscarrier = false;
        msgs = NULL;
@@ -134,6 +134,19 @@ update_online(DHCPCD_CONNECTION *con, bool showif)
                if (strcmp(i->reason, "RELEASE") == 0 ||
                    strcmp(i->reason, "STOP") == 0)
                        continue;
+               if (strcmp(i->type, "ipv4") != 0) {
+                       isstop = false;
+                       for (j = ifs; j; j = j->next)
+                               if (strcmp(j->ifname, i->ifname) == 0 &&
+                                   strcmp(j->type, "ipv4") == 0)
+                               {
+                                       if (strcmp(j->reason, "STOP") == 0)
+                                               isstop = true;
+                                       break;
+                               }
+                       if (isstop)
+                               continue;
+               }
                if (i->up)
                        ison = iscarrier = true;
                if (!iscarrier && g_strcmp0(i->reason, "CARRIER") == 0)