Message ID | 1412958927-20138-1-git-send-email-toby.gray@realvnc.com |
---|---|
State | Accepted |
Headers | show |
On Fri, Oct 10, 2014 at 05:35:27PM +0100, Toby Gray wrote: > The definition of wpa_ctrl_get_remote_ifname is conditional on > CONFIG_CTRL_IFACE_UDP. This change makes the header declaration of > this function also conditional on the same define. Thanks, applied. That said, I only applied this since this was for wpa_ctrl.h which is used by external programs. I'm not planning on any extra #ifdef blocks to rest of the header files where number of prototypes are defined for functions that are included into build conditionally.
On 12/10/14 17:53, Jouni Malinen wrote: > > Thanks, applied. That said, I only applied this since this was for > wpa_ctrl.h which is used by external programs. I'm not planning on any > extra #ifdef blocks to rest of the header files where number of > prototypes are defined for functions that are included into build > conditionally. That's entirely understandable. I probably should have added a bit more context: I'm using swig to provide a Python wrapper for wpa_ctrl.h. Without this change swig will generate references to wpa_ctrl_get_remote_ifname when processing wpa_ctrl.h. Obviously using wpaspy would be an alternative to using swig to wrap wpa_ctrl.h... Regards, Toby
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 4812f8d..e4619a7 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -383,8 +383,6 @@ int wpa_ctrl_pending(struct wpa_ctrl *ctrl); */ int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl); -char * wpa_ctrl_get_remote_ifname(struct wpa_ctrl *ctrl); - #ifdef ANDROID /** * wpa_ctrl_cleanup() - Delete any local UNIX domain socket files that @@ -402,6 +400,8 @@ void wpa_ctrl_cleanup(void); #define WPA_CTRL_IFACE_PORT_LIMIT 50 /* decremented from start */ #define WPA_GLOBAL_CTRL_IFACE_PORT 9878 #define WPA_GLOBAL_CTRL_IFACE_PORT_LIMIT 20 /* incremented from start */ + +char * wpa_ctrl_get_remote_ifname(struct wpa_ctrl *ctrl); #endif /* CONFIG_CTRL_IFACE_UDP */
The definition of wpa_ctrl_get_remote_ifname is conditional on CONFIG_CTRL_IFACE_UDP. This change makes the header declaration of this function also conditional on the same define. Signed-off-by: Toby Gray <toby.gray@realvnc.com> --- src/common/wpa_ctrl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)