pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/46987 (pkgsrc does not bootstrap under openSUSE)



The following reply was made to PR pkg/46987; it has been noted by GNATS.

From: "Andrey N. Oktyabrski" <ano%bestmx.ru@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/46987 (pkgsrc does not bootstrap under openSUSE)
Date: Thu, 20 Sep 2012 22:41:25 +0400

 I have a patch (thanks to my friend arn):
 
 --- ftp.c.orig  2012-09-20 22:37:54.270558121 +0400
 +++ ftp.c       2012-09-20 22:37:33.174453472 +0400
 @@ -146,7 +146,10 @@
              !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
                  return;
          sin4 = (struct sockaddr_in *)sin6;
 -       addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
 +       addr = (((uint32_t)sin6->sin6_addr.s6_addr[12] & 0xff) << 24)
 +            | (((uint32_t)sin6->sin6_addr.s6_addr[13] & 0xff) << 16)
 +            | (((uint32_t)sin6->sin6_addr.s6_addr[14] & 0xff) <<  8)
 +            |  ((uint32_t)sin6->sin6_addr.s6_addr[15] & 0xff);
          port = sin6->sin6_port;
          memset(sin4, 0, sizeof(struct sockaddr_in));
          sin4->sin_addr.s_addr = addr;
 
 Is this patch correct?
 


Home | Main Index | Thread Index | Old Index