net: Move env_get_ip() out of the header file
This function requires access to env.h but it is a lot to include just for the env_get() function. It eventually pulls in linux/byteorder which causes a conflict with exfat which has its own byteorder functions. Move the function to a C file instead. Add includes to some other files to keep the build working. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <env.h>
|
||||
#include <net-common.h>
|
||||
|
||||
void copy_filename(char *dst, const char *src, int size)
|
||||
@@ -25,3 +26,8 @@ int wget_request(ulong dst_addr, char *uri, struct wget_http_info *info)
|
||||
wget_info = info ? info : &default_wget_info;
|
||||
return wget_with_dns(dst_addr, uri);
|
||||
}
|
||||
|
||||
struct in_addr env_get_ip(char *var)
|
||||
{
|
||||
return string_to_ip(env_get(var));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user