Castaglia / proftpd-mod_snmp

SNMP module for ProFTPD
1 stars 1 forks source link

BUILD_STAMP not defined #1

Closed cliles closed 11 years ago

cliles commented 11 years ago

Makefile does not define BUILD_STAMP, so db.c will not compile.

db.c: In function 'snmp_db_get_value': db.c:701:74: error: expected ';' before 'BUILD_STAMP' make[2]: *\ [db.lo] Error 1

Castaglia commented 11 years ago

How are you currently attempting to build mod_snmp?

The steps I usually use are:

cd /path/to/proftpd-source/

mkdir -p contrib/mod_snmp/

cp /path/to/git/proftpd-mod_snmp/* contrib/mod_snmp/

./configure --with-modules=mod_snmp ...

make

make install

cliles commented 11 years ago

please disregard. The sepc file I was using (shameless stolen from opensuse) has a patch that was applying named "no_BuildDate.patch" that was removing the buildstamp.h creation.

cliles commented 11 years ago

more compile time errors.

-fresh proftpd 1.3.4b tarball -no patches this time -mod_snmp from master

building with: export 'CFLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED' CFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED' export 'CXXFLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED' CXXFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED' CFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED' export CFLAGS CXXFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED' export CXXFLAGS FFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' export FFLAGS ./configure --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --with-pic --bindir=/usr/sbin --libexecdir=/usr/lib64/proftpd --sysconfdir=/etc/proftpd --localstatedir=/var/run/proftpd --enable-sendfile --enable-ctrls --enable-dso --enable-facl --enable-ipv6 --enable-nls --enable-openssl --with-lastlog --with-includes=/usr/include/mysql:/usr/include/pgsql --with-shared=mod_dynmasq:mod_ctrls_admin:mod_load:mod_quotatab_sql:mod_shaper:mod_sftp:mod_quotatab_radius:mod_sql_odbc:mod_sql_sqlite:mod_exec:mod_ban:mod_readme:mod_wrap:mod_ratio:mod_ldap:mod_quotatab_file:mod_quotatab_ldap:mod_sql_passwd:mod_wrap2_file:mod_wrap2:mod_tls_memcache:mod_ifversion:mod_sftp_sql:mod_ifsession:mod_tls:mod_copy:mod_sftp_pam:mod_unique_id:mod_qos:mod_radius:mod_site_misc:mod_tls_shmcache:mod_deflate:mod_sql_postgres:mod_sql:mod_sql_mysql:mod_quotatab:mod_rewrite:mod_wrap2_sql:mod_snmp --disable-ident --disable-strip

make

errors libtool: compile: gcc -DHAVE_CONFIG_H -DLINUX -I. -I../.. -I../../include -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED -Wall -DPR_SHARED_MODULE -c uptime.c -fPIC -DPIC -o .libs/uptime.o uptime.c: In function ‘snmp_uptime_via_sysctl’: uptime.c:63:12: error: ‘KERN_BOOTTIME’ undeclared (first use in this function) uptime.c:63:12: note: each undeclared identifier is reported only once for each function it appears in uptime.c: At top level: uptime.c:56:12: warning: ‘snmp_uptime_via_sysctl’ defined but not used make[2]: * [uptime.lo] Error 1 make[2]: Leaving directory `/usr/src/packages/BUILD/proftpd-1.3.4b/contrib/mod_snmp' make[1]: * [shared] Error 2 make[1]: Leaving directory`/usr/src/packages/BUILD/proftpd-1.3.4b/modules' make: *\ [modules] Error 2

reducing to minimal configure line (./configure --with-shared=mod_snmp) produces same error.

Castaglia commented 11 years ago

Could you provide the config.h file generated by your configure command? And the platform on which you're compiling? I started developing mod_snmp on a Mac OSX machine; looks like there needs to more portability checks with regard to uptime (so knowing the platform/OS/version you're using will help).

cliles commented 11 years ago

building on an ancient opensuse 11.3

$ uname -a
Linux buildbox 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated automatically from configure.in by autoheader.  */
/* -*- C -*- */
/* @configure_input@ */
#ifndef         config_h_included
#define         config_h_included
/*************************************************************************
 * This section is automatically generated by 'configure'.  Adjust these
 * if configure didn't make a correct guess for your system.
 *************************************************************************/
/* Define to be the build options. */
#define PR_BUILD_OPTS " '--with-shared=mod_snmp' 'CFLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED'"
/* Define to be the build CFLAGS.  */
#define PR_BUILD_CFLAGS "-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED -Wall"
/* Define to be the build LDLAGS.  */
#define PR_BUILD_LDFLAGS "-L$(top_srcdir)/lib  "
/* Define to be the build LIBS.  */
#define PR_BUILD_LIBS " -L$(top_srcdir)/lib/libcap -lcap  -lpam -lsupp -lcrypt -ldl "
/* Define to be the build platform. */
#define PR_PLATFORM "LINUX"
/* Define to `int' if  doesn't define. */
/* #undef ino_t */
/* Define to `int' if  doesn't define. */
#define HAVE_INTPTR_T 1
#if !defined(HAVE_INTPTR_T)
# define intptr_t       int
#endif /* HAVE_INTPTR_T */
/* Define to `int' if  doesn't define. */
/* #undef socklen_t */
/* Define if you have AIX send_file() semantics. */
/* #undef HAVE_AIX_SENDFILE */
/* Define if you have BSD POSIX ACLs. */
/* #undef HAVE_BSD_POSIX_ACL */
/* Define if you have BSD sendfile() semantics. */
/* #undef HAVE_BSD_SENDFILE */
/* Define if you have Linux POSIX ACLs. */
#define HAVE_LINUX_POSIX_ACL 1
/* Define if you have Linux sendfile() semantics. */
#define HAVE_LINUX_SENDFILE 1
/* Define if you have Mac OSX sendfile() semantics.  */
/* #undef HAVE_MACOSX_SENDFILE */
/* Define if you have Solaris POSIX ACLs. */
/* #undef HAVE_SOLARIS_POSIX_ACL */
/* Define if you have Solaris sendfile() semantics. */
/* #undef HAVE_SOLARIS_SENDFILE */
/* Define if your  defines the LOG_CRON macro */
#define HAVE_LOG_CRON 1
/* Define if your  defines the LOG_FTP macro */
#define HAVE_LOG_FTP 1
/* Define if you want support for PAM based authentication */
#define HAVE_PAM 1
/* Define if your DIR structure has member dd_fd */
/* #undef HAVE_STRUCT_DIR_DD_FD */
/* Define if your DIR structure has member __dd_fd */
/* #undef HAVE_STRUCT_DIR___DD_FD */
/* Define if you have struct cmsgcred.  */
/* #undef HAVE_STRUCT_CMSGCRED */
/* Define if you have struct sockcred.  */
/* #undef HAVE_STRUCT_SOCKCRED */
/* Define if your spwd structure has member warn */
#define HAVE_SPWD_SP_WARN 1
/* Define if your spwd structure has member inact */
#define HAVE_SPWD_SP_INACT 1
/* Define if your spwd structure has member expire */
#define HAVE_SPWD_SP_EXPIRE 1
/* Define if your system has __progname */
#define HAVE___PROGNAME 1
/* Define if your system has _pw_stayopen variable (IRIX specific?) */
/* #undef HAVE__PW_STAYOPEN */
/* Define if your system has POSIX ACL support */
#define HAVE_POSIX_ACL 1
/* Define if your system has the sendfile function */
#define HAVE_SENDFILE 1
/* Define this if you have the setpassent function */
/* #undef HAVE_SETPASSENT */
/* Define if your system has the setspent function.  */
#define HAVE_SETSPENT 1
/* Define if your DIR structure has member d_fd */
/* #undef HAVE_STRUCT_DIR_D_FD */
/* Define if you have the  header file. */
#define HAVE_SYSLOG_H 1
/* Define if you already have a typedef for timer_t */
#define HAVE_TIMER_T 1
/* Define if you have the tzname global variable.  */
#define HAVE_TZNAME 1
/* Define if your struct utmp has ut_host */
#define HAVE_UT_UT_HOST 1
/* Define if your struct utmp uses ut_user and not ut_name */
#define HAVE_UTMAXTYPE 1
#define PF_ARGV_NONE            0
#define PF_ARGV_NEW             1
#define PF_ARGV_WRITEABLE       2
#define PF_ARGV_PSTAT           3
#define PF_ARGV_PSSTRINGS       4
/* If you don't have setproctitle, PF_ARGV_TYPE needs to be set to either
 * PF_ARGV_NEW (replace argv[] arguments), PF_ARGV_WRITEABLE (overwrite
 * argv[]), PF_ARGV_PSTAT (use the pstat function), or PF_ARGV_PSSTRINGS
 * (use PS_STRINGS).
 * 
 * configure should, we hope , detect this for you.
 */
#define PF_ARGV_TYPE PF_ARGV_WRITEABLE
/* Define if using alloca.c.  */
/* #undef C_ALLOCA */
/* Define to empty if the keyword does not work.  */
/* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
   This function is required for alloca.c support on those systems.  */
/* #undef CRAY_STACKSEG_END */
/* Define to the type of elements in the array set by `getgroups'.
   Usually this is either `int' or `gid_t'.  */
#define GETGROUPS_T gid_t
/* Define to `int' if  doesn't define.  */
/* #undef gid_t */
/* Define if you have alloca, as a function or macro.  */
#define HAVE_ALLOCA 1
/* Define if you have  and it should be used (not on Ultrix).  */
#define HAVE_ALLOCA_H 1
/* Define if you don't have vprintf but do have _doprnt.  */
/* #undef HAVE_DOPRNT */
/* Define if you have the vprintf function.  */
#define HAVE_VPRINTF 1
/* Define as __inline if that's what the C compiler calls it.  */
/* #undef inline */
/* Define to `int' if  doesn't define.  */
/* #undef mode_t */
/* Define to `long' if  doesn't define.  */
/* #undef off_t */
/* Define to `int' if  doesn't define.  */
/* #undef pid_t */
/* Define as the return type of signal handlers (int or void).  */
#define RETSIGTYPE void
/* Define if the `setpgrp' function takes no argument.  This is the default
 * POSIX signature, so assume that the host system uses the POSIX
 * signature.  This avoids cross-compilation errors; the Autoconf macro
 * AC_FUNC_SETPGRP causes the configure script to fail when cross-compiling.
 * Thus we always assume the POSIX signature.  If this is incorrect,
 * the generated config.h file can be updated manually.
 */
#define SETPGRP_VOID 1
/* Define if the `setgrent` function returns void.  */
#define SETGRENT_VOID 1
/* Define to `unsigned' if  doesn't define.  */
/* #undef size_t */
/* If using the C implementation of alloca, define if you know the
   direction of stack growth for your system; otherwise it will be
   automatically deduced at run-time.
 STACK_DIRECTION > 0 => grows toward higher addresses
 STACK_DIRECTION < 0 => grows toward lower addresses
 STACK_DIRECTION = 0 => direction of growth unknown
 */
/* #undef STACK_DIRECTION */
/* Define if you have the ANSI C header files.  */
#define STDC_HEADERS 1
/* Define if you can safely include both  and .  */
#define TIME_WITH_SYS_TIME 1
/* Define if your  declares struct tm.  */
/* #undef TM_IN_SYS_TIME */
/* Define to `int' if  doesn't define.  */
/* #undef uid_t */
/* The number of bytes in a short.  */
#define SIZEOF_SHORT 2
/* The number of bytes in an int.  */
#define SIZEOF_INT 4
/* The number of bytes in a long.  */
#define SIZEOF_LONG 8
/* The number of bytes in a long long.  */
#define SIZEOF_LONG_LONG 8
/* The number of bytes in an off_t.  */
#define SIZEOF_OFF_T 8
/* The number of bytes in a size_t.  */
#define SIZEOF_SIZE_T 8
/* The number of bytes in a time_t.  */
#define SIZEOF_TIME_T 8
/* The number of bytes in a pointer to a char.  */
#define SIZEOF_CHAR_P 8
/* The number of bytes in a pointer to a void.  */
#define SIZEOF_VOID_P 8
/* Define if you have the backtrace function.  */
/* #undef HAVE_BACKTRACE */
/* Define if you have the backtrace_symbols function.  */
/* #undef HAVE_BACKTRACE_SYMBOLS */
/* Define if you have the bcopy function.  */
#define HAVE_BCOPY 1
/* Define if you have the crypt function.  */
#define HAVE_CRYPT 1
/* Define if you have the dirfd function.  */
#define HAVE_DIRFD 1
/* Define if you have the endprotoent function.  */
#define HAVE_ENDPROTOENT 1
/* Define if you have the fconvert function.  */
/* #undef HAVE_FCONVERT */
/* Define if you have the fcvt function.  */
/* #undef HAVE_FCVT */
/* Define if you have the fdatasync function.  */
#define HAVE_FDATASYNC 1
/* Define if you have the fgetgrent function.  */
#define HAVE_FGETGRENT 1
/* Define if you have the fgetpwent function.  */
#define HAVE_FGETPWENT 1
/* Define if you have the flock function.  */
#define HAVE_FLOCK 1
/* Define if you have the fpathconf function.  */
#define HAVE_FPATHCONF 1
/* Define if you have the fgetspent function.  */
#define HAVE_FGETSPENT 1
/* Define if you have the freeaddrinfo function.  */
#define HAVE_FREEADDRINFO 1
/* Define if you have the futimes function.  */
#define HAVE_FUTIMES 1
/* Define if you have the gai_strerror function.  */
#define HAVE_GAI_STRERROR 1
/* Define if you have the getaddrinfo function.  */
#define HAVE_GETADDRINFO 1
/* Define if you have the getcwd function.  */
#define HAVE_GETCWD 1
/* Define if you have the getenv function.  */
#define HAVE_GETENV 1
/* Define if you have the getgrouplist function.  */
#define HAVE_GETGROUPLIST 1
/* Define if you have the getgrset function.  */
/* #undef HAVE_GETGRSET */
/* Define if you have the gethostbyname2 function.  */
#define HAVE_GETHOSTBYNAME2 1
/* Define if you have the gethostname function.  */
#define HAVE_GETHOSTNAME 1
/* Define if you have the getnameinfo function.  */
#define HAVE_GETNAMEINFO 1
/* Define if you have the getopt function.  */
#define HAVE_GETOPT 1
/* Define if you have the getopt_long function.  */
#define HAVE_GETOPT_LONG 1
/* Define if you have the getpeereid function.  */
/* #undef HAVE_GETPEEREID */
/* Define if you have the getpeerucred function.  */
/* #undef HAVE_GETPEERUCRED */
/* Define if you have the getpgid function.  */
#define HAVE_GETPGID 1
/* Define if you have the getpgrp function.  */
#define HAVE_GETPGRP 1
/* Define if you have the getprpwent function.  */
/* #undef HAVE_GETPRPWENT */
/* Define if you have the gettimeofday function.  */
#define HAVE_GETTIMEOFDAY 1
/* Define if you have the hstrerror function.  */
#define HAVE_HSTRERROR 1
/* Define if you have the iconv function.  */
#define HAVE_ICONV 1
/* Define if you have the inet_aton function.  */
#define HAVE_INET_ATON 1
/* Define if you have the inet_ntop function.  */
#define HAVE_INET_NTOP 1
/* Define if you have the inet_pton function.  */
#define HAVE_INET_PTON 1
/* Define if you have the loginrestrictions function.  */
/* #undef HAVE_LOGINRESTRICTIONS */
/* Define if you have the memcpy function.  */
#define HAVE_MEMCPY 1
/* Define if you have the mempcpy function.  */
#define HAVE_MEMPCPY 1
/* Define if you have the mkdir function.  */
#define HAVE_MKDIR 1
/* Define if you have the mkstemp function.  */
#define HAVE_MKSTEMP 1
/* Define if you have the mlock function.  */
#define HAVE_MLOCK 1
/* Define if you have the mlockall function.  */
#define HAVE_MLOCKALL 1
/* Define if you have the munlock function.  */
#define HAVE_MUNLOCK 1
/* Define if you have the munlockall function.  */
#define HAVE_MUNLOCKALL 1
/* Define if you have the MySQL make_scrambled_password_323 function.  */
/* #undef HAVE_MYSQL_MAKE_SCRAMBLED_PASSWORD_323 */
/* Define if you have the nl_langinfo function.  */
#define HAVE_NL_LANGINFO 1
/* Define if you have the pathconf function.  */
#define HAVE_PATHCONF 1
/* Define if you have the perm_copy_fd function.  */
#define HAVE_PERM_COPY_FD 1
/* Define if you have the Postgres PQescapeStringConn function.  */
/* #undef HAVE_POSTGRES_PQESCAPESTRINGCONN */
/* Define if you have the pstat function.  */
/* #undef HAVE_PSTAT */
/* Define if you have the putenv function.  */
#define HAVE_PUTENV 1
/* Define if you have the regcomp function.  */
#define HAVE_REGCOMP 1
/* Define if you have the rmdir function.  */
#define HAVE_RMDIR 1
/* Define if you have the select function.  */
#define HAVE_SELECT 1
/* Define if you have the set_auth_parameters function.  */
/* #undef HAVE_SET_AUTH_PARAMETERS */
/* Define if you have the setegid function.  */
#define HAVE_SETEGID 1
/* Define if you have the setenv function.  */
#define HAVE_SETENV 1
/* Define if you have the seteuid function.  */
#define HAVE_SETEUID 1
/* Define if you have the setgroupent function.  */
/* #undef HAVE_SETGROUPENT */
/* Define if you have the setgroups function.  */
#define HAVE_SETGROUPS 1
/* Define if you have the setpgid function.  */
#define HAVE_SETPGID 1
/* Define if you have the setproctitle function.  */
/* #undef HAVE_SETPROCTITLE */
/* Define if your system has the setprotoent function.  */
#define HAVE_SETPROTOENT 1
/* Define if you have the setsid function.  */
#define HAVE_SETSID 1
/* Define if you have the siginterrupt function.  */
#define HAVE_SIGINTERRUPT 1
/* Define if you have the snprintf function.  */
#define HAVE_SNPRINTF 1
/* Define if you have the socket function.  */
#define HAVE_SOCKET 1
/* Define if you have the statfs function.  */
#define HAVE_STATFS 1
/* Define if you have the strchr function.  */
#define HAVE_STRCHR 1
/* Define if you have the strcoll function.  */
#define HAVE_STRCOLL 1
/* Define if you have the strerror function.  */
#define HAVE_STRERROR 1
/* Define if you have the strsep function.  */
#define HAVE_STRSEP 1
/* Define if you have the strtod function.  */
#define HAVE_STRTOD 1
/* Define if you have the strtof function.  */
#define HAVE_STRTOF 1
/* Define if you have the strtol function.  */
#define HAVE_STRTOL 1
/* Define if you have the strtoull function.  */
#define HAVE_STRTOULL 1
/* Define if you have the tzset function.  */
#define HAVE_TZSET 1
/* Define if you have the uname function.  */
#define HAVE_UNAME 1
/* Define if you have the unsetenv function.  */
#define HAVE_UNSETENV 1
/* Define if you have the vsnprintf function.  */
#define HAVE_VSNPRINTF 1
/* Define if you have the  header file.  */
#define HAVE_ACL_LIBACL_H 1
/* Define if you have the  header file.  */
#define HAVE_ARPA_INET_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_BSTRING_H */
/* Define if you have the  header file.  */
/* #undef HAVE_CHECK_H */
/* Define if you have the  header file.  */
#define HAVE_CRYPT_H 1
/* Define if you have the  header file.  */
#define HAVE_CTYPE_H 1
/* Define if you have the  header file.  */
#define HAVE_DIRENT_H 1
/* Define if you have the  header file.  */
#define HAVE_ERRNO_H 1
/* Define if you have the  header file.  */
#define HAVE_EXECINFO_H 1
/* Define if you have the  header file.  */
#define HAVE_FCNTL_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_FLOATINGPOINT_H */
/* Define if you have the  header file.  */
#define HAVE_GETOPT_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_HPSECURITY_H */
/* Define if you have the  header file.  */
/* #undef HAVE_KRB_H */
/* Define if you have the  header file.  */
#define HAVE_ICONV_H 1
/* Define if you have the  header file.  */
#define HAVE_INTTYPES_H 1
/* Define if you have the  header file.  */
#define HAVE_LANGINFO_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_LASTLOG_H */
/* Define if you have the  header file.  */
#define HAVE_LIBINTL_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_LIBUTIL_H */
/* Define if you have the  header file.  */
#define HAVE_LIMITS_H 1
/* Define if you have the  header file.  */
#define HAVE_LINUX_CAPABILITY_H 1
/* Define if you have the  header file.  */
#define HAVE_LOCALE_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_LOGIN_H */
/* Define if you have the  header file.  */
#define HAVE_MEMORY_H 1
/* Define if you have the  header file.  */
#define HAVE_NCURSES_H 1
/* Define if you have the  header file.  */
#define HAVE_CURSES_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_NDIR_H */
/* Define if you have the  header file.  */
#define HAVE_NETDB_H 1
/* Define if you have the  header file.  */
#define HAVE_NETINET_IN_H 1
/* Define if you have the  header file.  */
#define HAVE_NETINET_IN_SYSTM_H 1
/* Define if you have the  header file.  */
#define HAVE_NETINET_IP_H 1
/* Define if you have the  header file.  */
#define HAVE_NETINET_TCP_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_PATHS_H */
/* Define if you have the  header file.  */
/* #undef HAVE_PROT_H */
/* Define if you have the  header file.  */
#define HAVE_REGEX_H 1
/* Define if you have the  header file.  */
#define HAVE_SECURITY_PAM_APPL_H 1
/* Define if you have the  header file.  */
#define HAVE_SECURITY_PAM_MODULES_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_PAM_PAM_APPL_H */
/* Define if you have the  header file.  */
#define HAVE_SHADOW_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_SIA_H */
/* Define if you have the  header file.  */
/* #undef HAVE_SIAD_H */
/* Define if you have the  header file.  */
#define HAVE_SIGNAL_H 1
/* Define if you have the  header file.  */
#define HAVE_STRING_H 1
/* Define if you have the  header file.  */
#define HAVE_STRINGS_H 1
/* Define if you have the  header file.  */
#define HAVE_STROPTS_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_ACL_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_DIR_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_FILE_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_IOCTL_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_MMAN_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_MOUNT_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the  header file.  */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_SYS_PSTAT_H */
/* Define if you have the  header file.  */
#define HAVE_SYS_RESOURCE_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_SYS_SECURITY_H */
/* Define if you have the  header file.  */
#define HAVE_SYS_SELECT_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_SENDFILE_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_SOCKET_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_STAT_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_STATVFS_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_SYS_TERMIO_H */
/* Define if you have the  header file.  */
#define HAVE_SYS_TERMIOS_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_TIME_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_SYS_UCRED_H */
/* Define if you have the  header file.  */
#define HAVE_SYS_UIO_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_UN_H 1
/* Define if you have the  header file.  */
#define HAVE_SYS_VFS_H 1
/* Define if you have  that is POSIX.1 compatible.  */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the  header file.  */
#define HAVE_TERMIOS_H 1
/* Define if you have the  header file.  */
#define HAVE_UCONTEXT_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_UCRED_H */
/* Define if you have the  header file.  */
#define HAVE_UNISTD_H 1
/* Define if you have the  header file.  */
/* #undef HAVE_USERSEC_H */
/* Define if you have the  header file.  */
#define HAVE_UTIME_H 1
/* Define if you have the  header file.  */
#define HAVE_UTMP_H 1
/* Define if you have the  header file.  */
#define HAVE_UTMPX_H 1
/* Define if you have the "vmsdir.h" header file.  */
/* #undef HAVE_VMSDIR_H */
/* Define if you have the acl library (-lacl).  */
#define HAVE_LIBACL 1
/* Define if you have the bind library (-lbind).  */
/* #undef HAVE_LIBBIND */
/* Define if you have the cap library (-lcap).  */
/* #undef HAVE_LIBCAP */
/* Define if you have the cap (v2) library (-lcap2).  */
/* #undef HAVE_LIBCAP2 */
/* Define if you have the crypt library (-lcrypt).  */
#define HAVE_LIBCRYPT 1
/* Define if you have the check library (-lcheck).  */
/* #undef HAVE_LIBCHECK */
/* Define if you have the curses library (-lcurses).  */
/* #undef HAVE_LIBCURSES */
/* Define if you have the UnixWare gen library (-lgen).  */
/* #undef HAVE_LIBGEN */
/* Define if you have the iconv library (-liconv).  */
/* #undef HAVE_LIBICONV */
/* Define if you have the intl library (-lintl).  */
/* #undef HAVE_LIBINTL */
/* Define if you have the ncurses library (-lncurses).  */
#define HAVE_LIBNCURSES 1
/* Define if you have the ncurses library (-lncursesw).  */
/* #undef HAVE_LIBNCURSESW */
/* Define if you have the nsl library (-lnsl).  */
/* #undef HAVE_LIBNSL */
/* Define if you have the resolv library (-lresolv).  */
/* #undef HAVE_LIBRESOLV */
/* Define if you have the sec library (-lsec).  */
/* #undef HAVE_LIBSEC */
/* Define if you have the security library (-lsecurity).  */
/* #undef HAVE_LIBSECURITY */
/* Define if you have the libtinfo library (-ltinfo).  */
/* #undef HAVE_LIBTINFO */
/* Define if you have the addrinfo struct.  */
#define HAVE_STRUCT_ADDRINFO 1
/* Define if you have the sockaddr_storage struct.  */
#define HAVE_STRUCT_SS 1
/* Define if you have the ss_family sockaddr_storage struct member.  */
#define HAVE_SS_FAMILY 1
/* Define if you have the __ss_family sockaddr_storage struct member.  */
/* #undef HAVE___SS_FAMILY */
/* Define if you have the ss_len sockaddr_storage struct member.  */
/* #undef HAVE_SS_LEN */
/* Define if you have the __ss_len sockaddr_storage struct member.  */
/* #undef HAVE___SS_LEN */
/* Define if you have the sin_len sockaddr_in struct member. */
/* #undef SIN_LEN */
/* Define if you have the socket library (-lsocket).  */
/* #undef HAVE_LIBSOCKET */
#ifndef STDIN_FILENO
#define STDIN_FILENO    0
#endif /* STDIN_FILENO */
#ifndef STDOUT_FILENO
#define STDOUT_FILENO   1
#endif /* STDOUT_FILENO */
#ifndef STDERR_FILENO
#define STDERR_FILENO   2
#endif /* STDERR_FILENO */
#ifndef PR_CONFIG_DIR
#define PR_CONFIG_DIR "/usr/local/etc"
#endif /* PR_CONFIG_DIR */
#ifndef PR_INCLUDE_DIR
#define PR_INCLUDE_DIR "/usr/local/include"
#endif /* PR_INCLUDE_DIR */
#ifndef PR_LIBEXEC_DIR
#define PR_LIBEXEC_DIR "/usr/local/libexec"
#endif /* PR_LIBEXEC_DIR */
#ifndef PR_LOCALE_DIR
#define PR_LOCALE_DIR "/usr/local/share/locale"
#endif /* PR_LOCALE_DIR */
#ifndef PR_RUN_DIR
#define PR_RUN_DIR "/usr/local/var"
#endif /* PR_RUN_DIR */
#ifndef PR_CONFIG_FILE_PATH
#define PR_CONFIG_FILE_PATH "/usr/local/etc/proftpd.conf"
#endif /* PR_CONFIG_FILE_PATH */
#ifndef PR_PID_FILE_PATH
#define PR_PID_FILE_PATH "/usr/local/var/proftpd.pid"
#endif /* PR_PID_FILE_PATH */
#ifndef PR_LASTLOG_PATH
/* #undef PR_LASTLOG_PATH */
#endif /* PR_LASTLOG_PATH */
/* Number of bits in a file offset, on hosts where this is settable. */
#ifndef _FILE_OFFSET_BITS
/* #undef _FILE_OFFSET_BITS */
#endif /* _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Define for use of hstrerror on AIX-style hosts. */
/* #undef _USE_IRS */
/* Define if auto-detection of shadow passwords is wanted.  */
/* #undef PR_USE_AUTO_SHADOW */
/* Define if controls support is desired.  */
/* #undef PR_USE_CTRLS */
/* Define if curses support, if available, should be used.  */
#define PR_USE_CURSES 1
/* Define if you are a developer. */
/* #undef PR_USE_DEVEL */
/* Define if DSO support is desired.  */
/* #undef PR_USE_DSO */
/* Define if use of POSIX ACL support is desired.  */
/* #undef PR_USE_FACL */
/* Define if use of builtin getaddrinfo() is desired.  */
/* #undef PR_USE_GETADDRINFO */
/* Define if use of builtin getnameinfo() is desired.  */
/* #undef PR_USE_GETNAMEINFO */
/* Define if IPv6 support is desired.  */
#define PR_USE_IPV6 1
/* Define if largefile support is desired.  */
#define PR_USE_LARGEFILES 1
/* Define if memcache support is desired.. */
/* #undef PR_USE_MEMCACHE */
/* Define if the %llu format should be used.  */
#define HAVE_LLU 1
/* Define if the %lu format should be used.  */
/* #undef HAVE_LU */
/* Define if lastlog support is desired.  */
/* #undef PR_USE_LASTLOG */
/* Define if NLS support, if available, should be used. */
/* #undef PR_USE_NLS */
/* Define if ncurses support, if available, should be used.  */
#define PR_USE_NCURSES 1
/* Define if ncursesw support, if available, should be used.  */
/* #undef PR_USE_NCURSESW */
/* Define if using nonblocking open of log files.  */
#define PR_USE_NONBLOCKING_LOG_OPEN 1
/* Define if OpenSSL support, if available, should be used.  */
/* #undef PR_USE_OPENSSL */
/* Define if OpenSSL support (with FIPS enabled), if available, should be
 * used.
 */
/* #undef PR_USE_OPENSSL_FIPS */
/* Define if using PCRE support.  */
/* #undef PR_USE_PCRE */
/* Define if sendfile support, if available, should be used.  */
#define PR_USE_SENDFILE 1
/* Define if using /etc/shadow files.  */
#define PR_USE_SHADOW 1
/* Define if using Tru64's C2 SIA authentication.  */
/* #undef PR_USE_SIA */
/* Define if use of system getopt is desired.  */
#define PR_USE_SYSTEM_GETOPT 1
/* Define if using testsuite support.  */
/* #undef PR_USE_TESTS */
/* Define if using trace support.  */
#define PR_USE_TRACE 1
/* Tunable parameters */
/* #undef PR_TUNABLE_BUFFER_SIZE */
/* #undef PR_TUNABLE_NEW_POOL_SIZE */
/* #undef PR_TUNABLE_SCOREBOARD_BUFFER_SIZE */
/* #undef PR_TUNABLE_TIMEOUTIDENT */
/* #undef PR_TUNABLE_TIMEOUTIDLE */
/* #undef PR_TUNABLE_TIMEOUTLINGER */
/* #undef PR_TUNABLE_TIMEOUTLOGIN */
/* #undef PR_TUNABLE_TIMEOUTNOXFER */
/* #undef PR_TUNABLE_TIMEOUTSTALLED */
/* #undef PR_TUNABLE_XFER_SCOREBOARD_UPDATES */
#endif /* config_h_included */
Castaglia commented 11 years ago

Thanks. In the contrib/mod_snmp/ directory, there is a mod_snmp.h file; could you provide the contents of that file as well, please?

cliles commented 11 years ago

As requested

/* mod_snmp.h.  Generated from mod_snmp.h.in by configure.  */
/*
 * ProFTPD - mod_snmp
 * Copyright (c) 2008-2012 TJ Saunders
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
 *
 * As a special exemption, TJ Saunders and other respective copyright holders
 * give permission to link this program with OpenSSL, and distribute the
 * resulting executable, without including the source code for OpenSSL in the
 * source distribution.
 *
 * $Id: mod_sftp.h.in,v 1.21 2011/05/24 21:00:11 castaglia Exp $
 */
#ifndef MOD_SNMP_H
#define MOD_SNMP_H
#include "conf.h"
#include "privs.h"
/* Define if you have the  header.  */
#define HAVE_SYS_SYSCTL_H 1
/* Define if you have the  header.  */
#define HAVE_SYS_SYSINFO_H 1
/* Define if you hvae the sysctl(3) function.  */
#define HAVE_SYSCTL 1
/* Define if you have the sysinfo(2) function.  */
#define HAVE_SYSINFO 1
#include 
#if HAVE_SYS_MMAN_H
# include 
#endif
#if HAVE_SYS_UIO_H
# include 
#endif
#define MOD_SNMP_VERSION        "mod_snmp/0.1"
/* Make sure the version of proftpd is as necessary. */
#if PROFTPD_VERSION_NUMBER < 0x0001030403
# error "ProFTPD 1.3.4rc3 or later required"
#endif
/* RFC1157, Section 4 defines SNMPv1 as having a version value of 0. */
#define SNMP_PROTOCOL_VERSION_1         0
/* RFC1901 defines SNMPv2 as having a version value of 1. */
#define SNMP_PROTOCOL_VERSION_2         1
#define SNMP_PROTOCOL_VERSION_3         3
/* Miscellaneous */
extern int snmp_logfd;
extern pool *snmp_pool;
extern struct timeval snmp_start_tv;
#endif
Castaglia commented 11 years ago

OK, perfect. I've just updated the uptime.c file; it should now build better in your environment.

cliles commented 11 years ago

Works good. Thanks!