Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant compilation In function ‘red_recv_udp_pkt’: #28

Closed
hzexe opened this issue Sep 3, 2012 · 3 comments
Closed

cant compilation In function ‘red_recv_udp_pkt’: #28

hzexe opened this issue Sep 3, 2012 · 3 comments

Comments

@hzexe
Copy link

hzexe commented Sep 3, 2012

c -g -O2 -std=gnu99 -Wall -c -o utils.o utils.c
utils.c: In function ‘red_recv_udp_pkt’:
utils.c:58: error: ‘IP_ORIGDSTADDR’ undeclared (first use in this function)
utils.c:58: error: (Each undeclared identifier is reported only once
utils.c:58: error: for each function it appears in.)

darkk-redsocks-070bd77.zip
libevent 2.0.xx
ubuntu i386

@darkk
Copy link
Owner

darkk commented Sep 4, 2012

Have you tried apt-get install linux-libc-dev ?
What ubuntu version do you have?
I would like to see output of lsb_release -a and dpkg -l | grep -- -dev to give you better advice.
You can also try release-0.4 instead of master if you don't need dynamic UDP redirection.

@hzexe
Copy link
Author

hzexe commented Sep 4, 2012

I'm sorry I have compiled it by adding the three line followed to redsocks.h:
#define IP_ORIGDSTADDR 20
#define IP_TRANSPARENT 19
#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR

And their have define in "in.h" in my ubuntu system.

$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid

$dpkg -l | grep -- -dev
ii autotools-dev 20090611.1 Update infrastructure for config.{guess,sub}
ii comerr-dev 2.1-1.41.11-1ubuntu2.1 common error description library - headers a
ii dpkg-dev 1.15.5.6ubuntu4.5 Debian package development tools
ii libapr1-dev 1.3.8-1ubuntu0.3 The Apache Portable Runtime Library - Develo
ii libaprutil1-dev 1.3.9+dfsg-3ubuntu0.10.04.1 The Apache Portable Runtime Utility Library
ii libatk1.0-dev 1.30.0-0ubuntu2.1 Development files for the ATK accessibility
ii libc-dev-bin 2.11.1-0ubuntu7.10 Embedded GNU C Library: Development binaries
ii libc6-dev 2.11.1-0ubuntu7.10 Embedded GNU C Library: Development Librarie
ii libcairo2-dev 1.8.10-2ubuntu1 Development files for the Cairo 2D graphics
ii libdb4.8-dev 4.8.24-1ubuntu1 Berkeley v4.8 Database Libraries [developmen
ii libdirectfb-dev 1.2.8-5ubuntu2 direct frame buffer graphics library - devel
ii libexpat1-dev 2.0.1-7ubuntu1 XML parsing C library - development kit
ii libfontconfig1-dev 2.8.0-2ubuntu1 generic font configuration library - develop
ii libfreetype6-dev 2.3.11-1ubuntu2.5 FreeType 2 font engine, development files
ii libgif-dev 4.1.6-9 library for GIF images (development)
ii libglade2-dev 1:2.6.4-1build1 development files for libglade
ii libglib2.0-dev 2.24.1-0ubuntu1 Development files for the GLib library
ii libgtk2.0-dev 2.20.1-0ubuntu2.1 Development files for the GTK+ library
ii libice-dev 2:1.0.6-1 X11 Inter-Client Exchange library (developme
ii libjpeg62-dev 6b-15ubuntu1 Development files for the IJG JPEG library
ii libkrb5-dev 1.8.1+dfsg-2ubuntu0.10 Headers and development libraries for MIT Ke
ii libldap2-dev 2.4.21-0ubuntu5.7 OpenLDAP development libraries
ii libltdl-dev 2.2.6b-2ubuntu1 A system independent dlopen wrapper for GNU
ii libmysqlclient-dev 5.1.41-3ubuntu12.10 MySQL database development files
ii libpango1.0-dev 1.28.0-0ubuntu2.2 Development files for the Pango
ii libpcre3-dev 7.8-3build1 Perl 5 Compatible Regular Expression Library
ii libpixman-1-dev 0.16.4-1ubuntu2 pixel-manipulation library for X and cairo (
ii libpng12-dev 1.2.42-1ubuntu2.3 PNG library - development
ii libpq-dev 8.4.11-0ubuntu0.10.04 header files for libpq5 (PostgreSQL library)
ii libproxychains-dev 3.1-2 proxy chains -- shared library (development)
ii libpthread-stubs0-dev 0.3-2 pthread stubs not provided by native libc, d
ii libsm-dev 2:1.1.1-1 X11 Session Management library (development
ii libsqlite3-dev 3.6.22-1 SQLite 3 development files
ii libssl-dev 0.9.8k-7ubuntu8.8 SSL development libraries, header files and
ii libstdc++6-4.4-dev 4.4.3-4ubuntu5 The GNU Standard C++ Library v3 (development
ii libsysfs-dev 2.1.0-6 interface library to sysfs - development fil
ii libtiff4-dev 3.9.2-2ubuntu0.7 Tag Image File Format library (TIFF), develo
ii libx11-dev 2:1.3.2-1ubuntu3 X11 client-side library (development headers
ii libxau-dev 1:1.0.5-1 X11 authorisation library (development heade
ii libxcb-render-util0-dev 0.3.6-1build1 utility libraries for X C Binding -- render-
ii libxcb-render0-dev 1.5-2 X C Binding, render extension, development f
ii libxcb1-dev 1.5-2 X C Binding, development files
ii libxcomposite-dev 1:0.4.1-1 X11 Composite extension library (development
ii libxcursor-dev 1:1.1.10-1 X cursor management library (development fil
ii libxdamage-dev 1:1.1.2-1 X11 damaged region extension library (develo
ii libxdmcp-dev 1:1.0.3-1 X11 authorisation library (development heade
ii libxext-dev 2:1.1.1-2 X11 miscellaneous extensions library (develo
ii libxfixes-dev 1:4.0.4-1 X11 miscellaneous 'fixes' extension library
ii libxft-dev 2.1.14-1ubuntu1 FreeType-based font drawing library for X (d
ii libxi-dev 2:1.3-3 X11 Input extension library (development hea
ii libxinerama-dev 2:1.1-2 X11 Xinerama extension library (development
ii libxml2-dev 2.7.6.dfsg-1ubuntu1.4 Development files for the GNOME XML library
ii libxrandr-dev 2:1.3.0-3 X11 RandR extension library (development hea
ii libxrender-dev 1:0.9.5-1 X Rendering Extension client library (develo
ii linux-libc-dev 2.6.32-39.86 Linux Kernel Headers for development
ii manpages-dev 3.23-1 Manual pages about using GNU/Linux for devel
ii uuid-dev 2.17.2-0ubuntu1.10.04.2 universally unique id library - headers and
ii x11proto-composite-dev 1:0.4.1-1 X11 Composite extension wire protocol
ii x11proto-core-dev 7.0.16-1 X11 core wire protocol and auxiliary headers
ii x11proto-damage-dev 1:1.2.0-1 X11 Damage extension wire protocol
ii x11proto-fixes-dev 1:4.1.1-2 X11 Fixes extension wire protocol
ii x11proto-input-dev 2.0-2 X11 Input extension wire protocol
ii x11proto-kb-dev 1.0.4-1 X11 XKB extension wire protocol
ii x11proto-randr-dev 1.3.1-1 X11 RandR extension wire protocol
ii x11proto-render-dev 2:0.11-1 X11 Render extension wire protocol
ii x11proto-xext-dev 7.1.1-2 X11 various extension wire protocol
ii x11proto-xinerama-dev 1.2-2 X11 Xinerama extension wire protocol
ii xtrans-dev 1.2.5-1 X transport library (development files)
ii zlib1g-dev 1:1.2.3.3.dfsg-15ubuntu1 compression library - development

@przemoc
Copy link
Contributor

przemoc commented Sep 6, 2012

The reason behind lacking macros is old version of eglibc headers in Ubuntu lucid (10.04 LTS): libc6-dev 2.11.1-0ubuntu7.10. These macros were introduced in 2.12. Debian squeeze (6; current stable) also has old eglibc headers: libc6-dev 2.11.3-3.

@darkk darkk closed this as completed in 18e2b5e Sep 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants