Ticket #587 (closed Bug report: fixed)

Opened 11 years ago

Last modified 11 years ago

libhttpd uses depricated index() and rindex()

Reported by: jacobmarble@… Owned by: gbastien
Priority: normal Milestone: Not yet assigned to a Milestone
Component: Gateway Version:
Keywords: Cc:

Description

When wifidog gateway is used in recent versions of OpenWrt? (8.09, 8.09.1, SVN), libhttpd calls to index() and rindex() fail. This is solved with the following patch:

Index: libhttpd/httpd.h =================================================================== --- libhttpd/httpd.h (revision 1401) +++ libhttpd/httpd.h (working copy) @@ -90,6 +90,9 @@

#define HTTP_ACL_PERMIT 1 #define HTTP_ACL_DENY 2

+// index() and rindex() are not available in OpenWrt? 8.09 +#define index(a,b) strchr(a,b) +#define rindex(a,b) strrchr(a,b)

extern char LIBHTTPD_VERSION[],

Attachments

libhttpd_patch.diff Download (402 bytes) - added by jacobmarble@… 11 years ago.

Change History

in reply to: ↑ description   Changed 11 years ago by anonymous

{{{Index: libhttpd/httpd.h =================================================================== --- libhttpd/httpd.h (revision 1401) +++ libhttpd/httpd.h (working copy) @@ -90,6 +90,9 @@

#define HTTP_ACL_PERMIT 1 #define HTTP_ACL_DENY 2

+// index() and rindex() are not available in OpenWrt? 8.09 +#define index(a,b) strchr(a,b) +#define rindex(a,b) strrchr(a,b)

extern char LIBHTTPD_VERSION[],

}}}

Changed 11 years ago by jacobmarble@…

  Changed 11 years ago by benoitg

It would appear that we can just replace the calls to these two functions:  http://www.gnu.org/s/libc/manual/html_node/Search-Functions.html

  Changed 11 years ago by gbastien

  • owner set to gbastien
  • status changed from new to assigned

  Changed 11 years ago by gbastien

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in [1429]

Note: See TracTickets for help on using tickets.