From: ulf at uclibc.org <ulf@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] svn commit: trunk/buildroot/package/netsnmp
Date: Tue, 17 Jul 2007 04:05:31 -0700 (PDT) [thread overview]
Message-ID: <20070717110531.BBD15A6866@busybox.net> (raw)
Author: ulf
Date: 2007-07-17 04:05:31 -0700 (Tue, 17 Jul 2007)
New Revision: 19126
Log:
Fix compile bugs caused by undefined preprocessor variables
Added:
trunk/buildroot/package/netsnmp/net-snmp-5.1.2.patch
Changeset:
Added: trunk/buildroot/package/netsnmp/net-snmp-5.1.2.patch
===================================================================
--- trunk/buildroot/package/netsnmp/net-snmp-5.1.2.patch (rev 0)
+++ trunk/buildroot/package/netsnmp/net-snmp-5.1.2.patch 2007-07-17 11:05:31 UTC (rev 19126)
@@ -0,0 +1,185 @@
+diff -urN net-snmp-5.1.2-0rig/agent/mibgroup/ucd-snmp/disk.c net-snmp-5.1.2/agent/mibgroup/ucd-snmp/disk.c
+--- net-snmp-5.1.2-0rig/agent/mibgroup/ucd-snmp/disk.c 2004-07-02 15:12:35.000000000 +0200
++++ net-snmp-5.1.2/agent/mibgroup/ucd-snmp/disk.c 2007-07-16 03:39:22.000000000 +0200
+@@ -97,7 +97,7 @@
+ #if HAVE_STRING_H
+ #include <string.h>
+ #endif
+-#if HAVE_FSTAB_H
++#if defined(HAVE_FSTAB_H)
+ #include <fstab.h>
+ #endif
+ #if HAVE_MNTENT_H
+@@ -230,7 +230,7 @@
+ static void
+ disk_parse_config(const char *token, char *cptr)
+ {
+-#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS
++#if defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS)
+ char tmpbuf[1024];
+ char path[STRMAX];
+ int minpercent;
+@@ -272,13 +272,13 @@
+ */
+ add_device(path, find_device(path), minspace, minpercent, 1);
+ }
+-#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */
++#endif /* defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS) */
+ }
+
+ static void
+ disk_parse_config_all(const char *token, char *cptr)
+ {
+-#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS
++#if defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS)
+ char tmpbuf[1024];
+ int minpercent = DISKMINPERCENT;
+
+@@ -311,7 +311,7 @@
+ find_and_add_allDisks(minpercent);
+ }
+ }
+-#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */
++#endif /* defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS) */
+ }
+
+
+@@ -374,16 +374,16 @@
+ static void
+ find_and_add_allDisks(int minpercent)
+ {
+-#if HAVE_GETMNTENT
++#if defined(HAVE_GETMNTENT)
+ #if HAVE_SYS_MNTTAB_H
+ struct mnttab mnttab;
+ #else
+ struct mntent *mntent;
+ #endif
+ FILE *mntfp;
+-#elif HAVE_FSTAB_H
++#elif defined(HAVE_FSTAB_H)
+ struct fstab *fstab1;
+-#elif HAVE_STATFS
++#elif defined(HAVE_STATFS)
+ struct statfs statf;
+ #endif
+ #if defined(HAVE_GETMNTENT) && !defined(HAVE_SETMNTENT)
+@@ -397,8 +397,8 @@
+ * string declared above and at the end of the routine return it
+ * to the caller
+ */
+-#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS
+-#if HAVE_GETMNTENT
++#if defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS)
++#if defined(HAVE_GETMNTENT)
+ #if HAVE_SETMNTENT
+ mntfp = setmntent(ETC_MNTTAB, "r");
+ while (NULL != (mntent = getmntent(mntfp))) {
+@@ -425,7 +425,7 @@
+ */
+ }
+ #endif /* HAVE_SETMNTENT */
+-#elif HAVE_FSTAB_H
++#elif defined(HAVE_FSTAB_H)
+ setfsent(); /* open /etc/fstab */
+ while((fstab1 = getfsent()) != NULL) {
+ add_device(fstab1->fs_file, fstab1->fs_spec, -1, minpercent, 0);
+@@ -437,7 +437,7 @@
+ * dummy clause for else below
+ */
+ }
+-#elif HAVE_STATFS
++#elif defined(HAVE_STATFS)
+ /*
+ * since there is no way to get all the mounted systems with just
+ * statfs we default to the root partition "/"
+@@ -461,24 +461,24 @@
+ }
+ #else
+ config_perror("'disk' checks not supported on this architecture.");
+-#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */
++#endif /* defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS) */
+
+ }
+
+ static u_char *
+ find_device(char *path)
+ {
+-#if HAVE_GETMNTENT
++#if defined(HAVE_GETMNTENT)
+ #if HAVE_SYS_MNTTAB_H
+ struct mnttab mnttab;
+ #else
+ struct mntent *mntent;
+ #endif
+ FILE *mntfp;
+-#elif HAVE_FSTAB_H
++#elif defined(HAVE_FSTAB_H)
+ struct fstab *fstab;
+ struct stat stat1;
+-#elif HAVE_STATFS
++#elif defined(HAVE_STATFS)
+ struct statfs statf;
+ #endif
+ char tmpbuf[1024];
+@@ -494,8 +494,8 @@
+ * string declared above and at the end of the routine return it
+ * to the caller
+ */
+-#if HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS
+-#if HAVE_GETMNTENT
++#if defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS)
++#if defined(HAVE_GETMNTENT)
+ #if HAVE_SETMNTENT
+ mntfp = setmntent(ETC_MNTTAB, "r");
+ while (NULL != (mntent = getmntent(mntfp)))
+@@ -526,14 +526,14 @@
+ sizeof(device));
+ }
+ #endif /* HAVE_SETMNTENT */
+-#elif HAVE_FSTAB_H
++#elif defined(HAVE_FSTAB_H)
+ stat(path, &stat1);
+ setfsent();
+ if ((fstab = getfsfile(path))) {
+ copy_nword(fstab->fs_spec, device,
+ sizeof(device));
+ }
+-#elif HAVE_STATFS
++#elif defined(HAVE_STATFS)
+ if (statfs(path, &statf) == 0) {
+ copy_word(statf.f_mntfromname, device);
+ DEBUGMSGTL(("ucd-snmp/disk", "Disk: %s\n",
+@@ -545,12 +545,12 @@
+ path);
+ config_pwarn(tmpbuf);
+ }
+-#if HAVE_FSTAB_H
++#if defined(HAVE_FSTAB_H)
+ endfsent();
+ #endif
+ #else
+ config_perror("'disk' checks not supported on this architecture.");
+-#endif /* HAVE_FSTAB_H || HAVE_GETMNTENT || HAVE_STATFS */
++#endif /* defined(HAVE_FSTAB_H) || defined(HAVE_GETMNTENT) || defined(HAVE_STATFS) */
+ return device;
+ }
+
+@@ -597,7 +597,7 @@
+ struct statvfs vfs;
+ #endif
+ #else
+-#if HAVE_FSTAB_H
++#if defined(HAVE_FSTAB_H)
+ int file;
+ union {
+ struct fs iu_fs;
+@@ -715,7 +715,7 @@
+ return ((u_char *) (errmsg));
+ }
+ #else
+-#if HAVE_FSTAB_H
++#if defined(HAVE_FSTAB_H)
+ /*
+ * read the disk information
+ */
next reply other threads:[~2007-07-17 11:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 11:05 ulf at uclibc.org [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-28 20:07 [Buildroot] svn commit: trunk/buildroot/package/netsnmp jacmet at uclibc.org
2008-12-28 16:08 jacmet at uclibc.org
2008-11-04 11:31 jacmet at uclibc.org
2008-11-04 11:26 jacmet at uclibc.org
2007-07-17 12:02 ulf at uclibc.org
2007-06-25 15:07 aldot at uclibc.org
2007-04-20 11:12 aldot at uclibc.org
2006-12-20 17:46 aldot at uclibc.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070717110531.BBD15A6866@busybox.net \
--to=ulf@uclibc.org \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox