git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/Libs - Fixing misc compile warnings
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libnet.so_src
/
main.c
diff --git
a/Usermode/Libraries/libnet.so_src/main.c
b/Usermode/Libraries/libnet.so_src/main.c
index
7f8d048
..
b39d754
100644
(file)
--- a/
Usermode/Libraries/libnet.so_src/main.c
+++ b/
Usermode/Libraries/libnet.so_src/main.c
@@
-69,6
+69,7
@@
char *Net_GetInterface(int AddressType, void *Address)
// Query the route manager for the route number
{
char buf[sizeof(int)+size];
// Query the route manager for the route number
{
char buf[sizeof(int)+size];
+ uint32_t *type = (void*)buf;
// Open
fd = open("/Devices/ip/routes", 0);
// Open
fd = open("/Devices/ip/routes", 0);
@@
-78,8
+79,8
@@
char *Net_GetInterface(int AddressType, void *Address)
}
// Make structure and ask
}
// Make structure and ask
- *
(int*)buf
= AddressType;
- memcpy(
&buf[sizeof(int)]
, Address, size);
+ *
type
= AddressType;
+ memcpy(
type+1
, Address, size);
routeNum = ioctl(fd, ioctl(fd, 3, "locate_route"), buf);
// Close
routeNum = ioctl(fd, ioctl(fd, 3, "locate_route"), buf);
// Close
UCC
git Repository :: git.ucc.asn.au