Skip to content

Commit f89257a

Browse files
authored
Merge pull request #517 from uyjulian/ps2ip_definition_fixes
Use correct symbol for ip4addr_aton, add aliases
2 parents 984ed79 + 88ed4d4 commit f89257a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

iop/tcpip/tcpip/include/ps2ip.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct pbuf* pbuf_coalesce(struct pbuf *p, pbuf_layer layer);
111111
#define inet_ntoa_r(addr, buf, buflen) ip4addr_ntoa_r((const ip4_addr_t*)&(addr), buf, buflen)
112112

113113
u32 ipaddr_addr(const char *cp);
114-
int ipaddr4_aton(const char *cp, ip4_addr_t *addr);
114+
int ip4addr_aton(const char *cp, ip4_addr_t *addr);
115115
/** returns ptr to static buffer; not reentrant! */
116116
char *ip4addr_ntoa(const ip4_addr_t *addr);
117117
char *ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen);
@@ -160,6 +160,8 @@ const ip_addr_t* dns_getserver(u8 numdns);
160160
#define getsockopt lwip_getsockopt
161161
#define setsockopt lwip_setsockopt
162162

163+
#define ipaddr4_aton(...) ip4addr_aton(__VA_ARGS__)
164+
163165
#define ps2ip_IMPORTS_start DECLARE_IMPORT_TABLE(ps2ip, 2, 6)
164166
#define ps2ip_IMPORTS_end END_IMPORT_TABLE
165167

@@ -208,18 +210,20 @@ const ip_addr_t* dns_getserver(u8 numdns);
208210
#define I_pbuf_take DECLARE_IMPORT(42, pbuf_take)
209211
#define I_pbuf_coalesce DECLARE_IMPORT(57, pbuf_coalesce)
210212
#define I_ipaddr_addr DECLARE_IMPORT(24, ipaddr_addr)
211-
#define I_inet_addr DECLARE_IMPORT(24, ipaddr_addr)
212-
#define I_ipaddr4_aton DECLARE_IMPORT(43, ipaddr4_aton)
213-
#define I_inet_aton DECLARE_IMPORT(43, ip4addr_aton)
213+
#define I_ip4addr_aton DECLARE_IMPORT(43, ip4addr_aton)
214214
#define I_ip4addr_ntoa DECLARE_IMPORT(44, ip4addr_ntoa)
215-
#define I_inet_ntoa DECLARE_IMPORT(44, ip4addr_ntoa)
216215
#define I_ip4addr_ntoa_r DECLARE_IMPORT(45, ip4addr_ntoa_r)
217-
#define I_inet_ntoa_r DECLARE_IMPORT(45, ip4addr_ntoa_r)
218216
#define I_lwip_gethostbyname DECLARE_IMPORT(48, lwip_gethostbyname)
219217
#define I_lwip_gethostbyname_r DECLARE_IMPORT(49, lwip_gethostbyname_r)
220218
#define I_lwip_freeaddrinfo DECLARE_IMPORT(50, lwip_freeaddrinfo)
221219
#define I_lwip_getaddrinfo DECLARE_IMPORT(51, lwip_getaddrinfo)
222220
#define I_dns_setserver DECLARE_IMPORT(52, dns_setserver)
223221
#define I_dns_getserver DECLARE_IMPORT(53, dns_getserver)
224222

223+
#define I_inet_addr I_ipaddr_addr
224+
#define I_ipaddr4_aton I_ip4addr_aton
225+
#define I_inet_aton I_ip4addr_aton
226+
#define I_inet_ntoa I_ip4addr_ntoa
227+
#define I_inet_ntoa_r I_ip4addr_ntoa_r
228+
225229
#endif /* __PS2IP_H__ */

0 commit comments

Comments
 (0)