GithubHelp home page GithubHelp logo

Comments (4)

WhyNotHugo avatar WhyNotHugo commented on September 3, 2024

So I understand the issue: both files being included define struct ethhdr. However, both of them defined other types which are used, so removing either of them is not an option.

from owl.

WhyNotHugo avatar WhyNotHugo commented on September 3, 2024

I tired hacking around this with this horrible patch:

diff --git a/daemon/io.c b/daemon/io.c
index 42688f5..b41e8fb 100644
--- a/daemon/io.c
+++ b/daemon/io.c
@@ -25,7 +25,10 @@
 #include <net/if.h>
 #include <sys/ioctl.h>
 #ifndef __APPLE__
-#include <linux/if_tun.h>
+/* #include <linux/if_tun.h> */
+#define IFF_NO_PI	0x1000
+#define IFF_TAP		0x0002
+#define TUNSETIFF     _IOW('T', 202, int)
 #else
 #include <sys/sys_domain.h>
 #include <sys/kern_control.h>

But build now fails with another unrelated error:

> make
[  5%] Built target radiotap
[ 51%] Built target awdl
[ 64%] Built target owl
[ 67%] Building CXX object googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /home/hugo/clones/github.com/seemoo-lab/owl/googletest/googletest/src/gtest-all.cc:42:
/home/hugo/clones/github.com/seemoo-lab/owl/googletest/googletest/src/gtest-death-test.cc: In function 'bool testing::internal::StackGrowsDown()':
/home/hugo/clones/github.com/seemoo-lab/owl/googletest/googletest/src/gtest-death-test.cc:1301:24: error: 'dummy' may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/hugo/clones/github.com/seemoo-lab/owl/googletest/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type 'const void*' to 'void testing::internal::StackLowerThanAddress(const void*, bool*)' declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/hugo/clones/github.com/seemoo-lab/owl/googletest/googletest/src/gtest-death-test.cc:1299:7: note: 'dummy' declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [googletest/googletest/CMakeFiles/gtest.dir/build.make:76: googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:322: googletest/googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

from owl.

rela81 avatar rela81 commented on September 3, 2024

Thanks to your "horrible" patch I was able to compile owl on Alpine successfully. I didn't get any further errors. You could also try to update googletest as described in issue #50

from owl.

WhyNotHugo avatar WhyNotHugo commented on September 3, 2024

Thanks for the pointer to #50. I've submitted #80 which fixes that other issue.

I'm still unsure what to do about this patch of mine, it doesn't seem clean enough to include on the project, but I also can't think of any cleaner approach.

from owl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.