Subject: Re: bug#38218: network-interface-list only returns IPv4 addresses

From: Eli Zaretskii <[email-masked]>
Date: Tue, 26 Nov 2019 19:17:49 +0200

> From: Robert Pluim <[email-masked]>
> Date: Tue, 26 Nov 2019 09:37:53 +0100
> Cc: [email-masked]
> 
>     Robert> Iʼll just push and wait for the screams then. (Eli, thatʼs a joke).
> 
> Iʼve now pushed it.

It needed a bit of tweaking for mingw.org's MinGW, so that it would
work on XP.  However, after making the changes, one test from
nsm-tests.el fails here:

  127.1/0 No such host is known.
  127.1/0 No such host is known.
  Test nsm-check-local-subnet-ipv4 backtrace:
    signal(ert-test-failed (((should (eq nil (nsm-should-check "127.1")
    ert-fail(((should (eq nil (nsm-should-check "127.1"))) :form (eq ni
    (if (unwind-protect (setq value-44 (apply fn-42 args-43)) (setq for
    (let (form-description-46) (if (unwind-protect (setq value-44 (appl
    (let ((value-44 'ert-form-evaluation-aborted-45)) (let (form-descri
    (let* ((fn-42 #'eq) (args-43 (condition-case err (let ((signal-hook
    (let ((nsm-trust-local-network t)) (let* ((fn-37 #'eq) (args-38 (co
    (let ((local-ip '[172 26 128 160 0]) (mask '[255 255 255 0 0]) (wro
    (closure (t) nil (let ((local-ip '[172 26 128 160 0]) (mask '[255 2
    ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-tes
    ert-run-test(#s(ert-test :name nsm-check-local-subnet-ipv4 :documen
    ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable))
    ert-run-tests((not (tag :unstable)) #f(compiled-function (event-typ
    ert-run-tests-batch((not (tag :unstable)))
    ert-run-tests-batch-and-exit((not (tag :unstable)))
    eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
    command-line-1((#("-L" 0 2 (charset cp862)) #(";." 0 2 (charset cp8
    command-line()
    normal-top-level()
  Test nsm-check-local-subnet-ipv4 condition:
      (ert-test-failed
       ((should
	 (eq nil
	     (nsm-should-check "127.1")))
	:form
	(eq nil t)
	:value nil))
     FAILED  1/2  nsm-check-local-subnet-ipv4 (4.656250 sec)

Does it work for you in your MinGW build?  If so, could you eyeball
the code I added/modified in w32.c to see if I goofed somewhere?

Thanks.