~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to debian/patches/ntpd-ni-maxhost.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-11-26 22:16:37 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091126221637-lbtdp0ax1yg9t0bx
Tags: 1:4.2.4p7+dfsg-4
* Use uname -s instead of dpkg-architecture to found the kernel we're
  running on.  dpkg-architecture is part of dpkg-dev. (Closes: #558145)
* Make the package fail to build on hurd since it does not provided
  the needed system calls for ntpd to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
use of MAXHOSTNAMELEN is incorrect here anyway.  (bug #387665,
3
3
http://bugs.ntp.org/978)
4
4
 
5
 
Index: ntp-4.2.4p0+dfsg/ntpd/ntp_intres.c
 
5
Index: ntp-4.2.4p7+dfsg/ntpd/ntp_intres.c
6
6
===================================================================
7
 
--- ntp-4.2.4p0+dfsg.orig/ntpd/ntp_intres.c     2007-04-10 10:48:59.000000000 +0200
8
 
+++ ntp-4.2.4p0+dfsg/ntpd/ntp_intres.c  2007-04-10 11:21:40.000000000 +0200
9
 
@@ -526,10 +526,10 @@
10
 
                        msyslog(LOG_INFO, "findhostaddr: Resolving %s>",
11
 
                                stoa(&entry->peer_store));
12
 
 #endif
 
7
--- ntp-4.2.4p7+dfsg.orig/ntpd/ntp_intres.c     2009-11-21 15:31:51.000000000 +0000
 
8
+++ ntp-4.2.4p7+dfsg/ntpd/ntp_intres.c  2009-11-21 15:33:52.000000000 +0000
 
9
@@ -506,10 +506,10 @@
 
10
                DPRINTF(2, ("findhostaddr: Resolving <%s>\n",
 
11
                        stoa(&entry->peer_store)));
 
12
 
13
13
-               entry->ce_name = emalloc(MAXHOSTNAMELEN);
14
14
+               entry->ce_name = emalloc(NI_MAXHOST);
15
15
                error = getnameinfo((const struct sockaddr *)&entry->peer_store,
18
18
+                                  (char *)&entry->ce_name, NI_MAXHOST,
19
19
                                   NULL, 0, 0);
20
20
        }
21
 
 #ifdef DEBUG
 
21