Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #26715

Closed (moved)
(moved)
Open
Created Jul 10, 2018 by Neel Chauhan@neel

Tor 85d6b41 on FreeBSD 12-CURRENT: error: use of undeclared identifier 'O_RDWR'

When I try to compile Tor 85d6b41 on FreeBSD 12-CURRENT, I get this build error:

neel@xb3:~/code/tor/tor % make
make  all-am
  CC       src/core/or/connection_edge.o
src/core/or/connection_edge.c:2123:36: error: use of undeclared identifier
      'O_RDWR'
  pf = tor_open_cloexec("/dev/pf", O_RDWR, 0);
                                   ^
src/core/or/connection_edge.c:2271:7: warning: implicit declaration of function
      'ioctl' is invalid in C99 [-Wimplicit-function-declaration]
  if (ioctl(pf, DIOCNATLOOK, &pnl) < 0) {
      ^
src/core/or/connection_edge.c:2271:7: warning: this function declaration is not
      a prototype [-Wstrict-prototypes]
src/core/or/connection_edge.c:2271:17: warning: implicit declaration of function
      '_IOWR' is invalid in C99 [-Wimplicit-function-declaration]
  if (ioctl(pf, DIOCNATLOOK, &pnl) < 0) {
                ^
/usr/include/net/pfvar.h:1392:21: note: expanded from macro 'DIOCNATLOOK'
#define DIOCNATLOOK     _IOWR('D', 23, struct pfioc_natlook)
                        ^
src/core/or/connection_edge.c:2271:17: warning: this function declaration is not
      a prototype [-Wstrict-prototypes]
/usr/include/net/pfvar.h:1392:21: note: expanded from macro 'DIOCNATLOOK'
#define DIOCNATLOOK     _IOWR('D', 23, struct pfioc_natlook)
                        ^
src/core/or/connection_edge.c:2271:17: error: expected expression
/usr/include/net/pfvar.h:1392:36: note: expanded from macro 'DIOCNATLOOK'
#define DIOCNATLOOK     _IOWR('D', 23, struct pfioc_natlook)
                                       ^
4 warnings and 2 errors generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/home/neel/code/tor/tor
*** Error code 1

Stop.
make: stopped in /usr/home/neel/code/tor/tor
neel@xb3:~/code/tor/tor %

I will upload a patch for this shortly.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking