Define print_caps() before we use it.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 14 Jul 2010 04:31:52 +0000 (04:31 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 14 Jul 2010 04:31:52 +0000 (04:31 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33514 f5534014-38df-0310-8fa8-9805f1628bb7

dumpcap.c

index 8d44a45aa2d8e351bfaac792bd6df9082189010e..3370fb0ed7cd86f938c28c2a7a861d376e33a794 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -477,6 +477,23 @@ cmdarg_err_cont(const char *fmt, ...)
 }
 
 #ifdef HAVE_LIBCAP
+static void
+#if 0 /* Set to enable capability debugging */
+/* see 'man cap_to_text()' for explanation of output                         */
+/* '='   means 'all= '  ie: no capabilities                                  */
+/* '=ip' means 'all=ip' ie: all capabilities are permissible and inheritable */
+/* ....                                                                      */
+print_caps(const char *pfx) {
+    cap_t caps = cap_get_proc();
+    g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG,
+          "%s: EUID: %d  Capabilities: %s", pfx,
+          geteuid(), cap_to_text(caps, NULL));
+    cap_free(caps);
+#else
+print_caps(const char *pfx _U_) {
+#endif
+}
+
 static void
 relinquish_all_capabilities(void)
 {
@@ -1370,24 +1387,6 @@ static void exit_main(int status)
  * CAP_NET_ADMIN and CAP_NET_RAW, then relinquish our permissions.
  * (See comment in main() for details)
  */
-
-static void
-#if 0 /* Set to enable capability debugging */
-/* see 'man cap_to_text()' for explanation of output                         */
-/* '='   means 'all= '  ie: no capabilities                                  */
-/* '=ip' means 'all=ip' ie: all capabilities are permissible and inheritable */
-/* ....                                                                      */
-print_caps(const char *pfx) {
-    cap_t caps = cap_get_proc();
-    g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG,
-          "%s: EUID: %d  Capabilities: %s", pfx,
-          geteuid(), cap_to_text(caps, NULL));
-    cap_free(caps);
-#else
-print_caps(const char *pfx _U_) {
-#endif
-}
-
 static void
 relinquish_privs_except_capture(void)
 {