Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pcercuei committed Apr 6, 2022
2 parents b6a0bad + e2d7161 commit f753364
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CI/build_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdir build-x64
cp .\libiio.iss.cmakein .\build-x64
cd build-x64

cmake -G "$COMPILER" -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DENABLE_IPV6=OFF -DWITH_USB_BACKEND=ON -DWITH_SERIAL_BACKEND=ON -DPYTHON_BINDINGS=ON -DCSHARP_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\64\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\64\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\64\\libserialport.dll.a" -DLIBUSB_INCLUDE_DIR="C:\\include\\libusb-1.0" -DLIBXML2_INCLUDE_DIR="C:\\include\\libxml2" ..
cmake -G "$COMPILER" -DCMAKE_SYSTEM_PREFIX_PATH="C:" -DENABLE_IPV6=ON -DWITH_USB_BACKEND=ON -DWITH_SERIAL_BACKEND=ON -DPYTHON_BINDINGS=ON -DCSHARP_BINDINGS:BOOL=ON -DLIBXML2_LIBRARIES="C:\\libs\\64\\libxml2.lib" -DLIBUSB_LIBRARIES="C:\\libs\\64\\libusb-1.0.lib" -DLIBSERIALPORT_LIBRARIES="C:\\libs\\64\\libserialport.dll.a" -DLIBUSB_INCLUDE_DIR="C:\\include\\libusb-1.0" -DLIBXML2_INCLUDE_DIR="C:\\include\\libxml2" ..
cmake --build . --config Release
if ( $LASTEXITCODE -ne 0 ) {
throw "[*] cmake build failure"
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ check_symbol_exists(newlocale "locale.h" HAS_NEWLOCALE)

option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
if (ENABLE_IPV6)
check_symbol_exists(in6addr_any "netinet/in.h" HAVE_IPV6)
if (WIN32)
set(HAVE_IPV6 ON)
else()
check_symbol_exists(in6addr_any "netinet/in.h" HAVE_IPV6)
endif()
if (NOT HAVE_IPV6)
message(SEND_ERROR "IPv6 is not available in your system.")
endif()
Expand Down
2 changes: 1 addition & 1 deletion dns_sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void dnssd_remove_node(const struct iio_context_params *params,

static int dnssd_add_scan_result(const struct iio_context_params *params,
struct iio_scan *scan_ctx,
char *hostname, char *addr_str, int port)
char *hostname, char *addr_str, uint16_t port)
{
struct iio_context *ctx;
char uri[sizeof("ip:") + MAXHOSTNAMELEN + sizeof (":65535") + 1];
Expand Down
2 changes: 1 addition & 1 deletion local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ local_create_context(const struct iio_context_params *params, const char *args)
if (WITH_LOCAL_CONFIG) {
ret = populate_context_attrs(ctx, "/etc/libiio.ini");
if (ret < 0)
goto err_context_destroy;
prm_warn(params, "Unable to read INI file: %d\n", ret);
}

uname(&uts);
Expand Down
1 change: 1 addition & 0 deletions network.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <sys/types.h>

#ifdef _WIN32
#include <netioapi.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#else
Expand Down
4 changes: 2 additions & 2 deletions tests/iio_rwdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ int main(int argc, char **argv)

argw = dup_argv(MY_NAME, argc, argv);

setup_sig_handler();

ctx = handle_common_opts(MY_NAME, argc, argw, MY_OPTS, options, options_descriptions);
opts = add_common_options(options);
if (!opts) {
Expand Down Expand Up @@ -339,8 +341,6 @@ int main(int argc, char **argv)
goto err_free_ctx;
}

setup_sig_handler();

dev = iio_context_find_device(ctx, argw[optind]);
if (!dev) {
fprintf(stderr, "Device %s not found\n", argw[optind]);
Expand Down

0 comments on commit f753364

Please sign in to comment.