Rationale for using extern:
---------------------------
The ipv4NetmaskToPrefixLength function is implemnted
in libnetutils/ifc_utils.c inside the android_system_core
repository[1].

In the lineage-16.0 branch[2]:
- ipv4NetmaskToPrefixLength is not declared in any
  headers in this repository.
- In the same repository, libnetutils/dhcpclient.c uses extern
  for the declaration of ipv4NetmaskToPrefixLength.

References:
-----------
[1]https://github.com/LineageOS/android_system_core
[2]At the time of writing it was at the following commit:
   e7f238619 healthd: make periodic battery status a debug message

Signed-off-by: Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org>
---
 data.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/data.c b/data.c
index 7f7439a..647f9b8 100644
--- a/data.c
+++ b/data.c
@@ -28,6 +28,8 @@
 #include <samsung-ril.h>
 #include <utils.h>
 
+extern int ipv4NetmaskToPrefixLength(in_addr_t mask);
+
 int ipc2ril_gprs_fail_cause(unsigned char fail_cause)
 {
        switch (fail_cause) {
-- 
2.21.0

_______________________________________________
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to