]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
fst: Fix compile error in fst_ctrl_aux.h with C++ compilers
authorLior David <liord@codeaurora.org>
Mon, 7 May 2018 14:59:51 +0000 (17:59 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 21 May 2018 14:47:03 +0000 (17:47 +0300)
Move enum fst_reason to be a top level type, since it is used as
argument in the function fst_reason_name() and having it as nested
type caused a compile error when fst_ctrl_aux.h was included from
a C++ source file.

Signed-off-by: Lior David <liord@codeaurora.org>
src/fst/fst_ctrl_aux.h

index e2133f5062bd1615ac89e7a8874cbd9be995025c..0aff5d061eae3671786d342c7f64c14a5a9c43e4 100644 (file)
@@ -35,6 +35,17 @@ enum fst_event_type {
                                         *  more info */
 };
 
+enum fst_reason {
+       REASON_TEARDOWN,
+       REASON_SETUP,
+       REASON_SWITCH,
+       REASON_STT,
+       REASON_REJECT,
+       REASON_ERROR_PARAMS,
+       REASON_RESET,
+       REASON_DETACH_IFACE,
+};
+
 enum fst_initiator {
        FST_INITIATOR_UNDEFINED,
        FST_INITIATOR_LOCAL,
@@ -57,16 +68,7 @@ union fst_event_extra {
                enum fst_session_state new_state;
                union fst_session_state_switch_extra {
                        struct {
-                               enum fst_reason {
-                                       REASON_TEARDOWN,
-                                       REASON_SETUP,
-                                       REASON_SWITCH,
-                                       REASON_STT,
-                                       REASON_REJECT,
-                                       REASON_ERROR_PARAMS,
-                                       REASON_RESET,
-                                       REASON_DETACH_IFACE,
-                               } reason;
+                               enum fst_reason reason;
                                u8 reject_code; /* REASON_REJECT */
                                /* REASON_SWITCH,
                                 * REASON_TEARDOWN,