Ticket #39413: patch-Port-bsd-lowlevel-bsd.c.diff

File patch-Port-bsd-lowlevel-bsd.c.diff, 1.4 KB (added by fclaire@…, 11 years ago)
  • Port-bsd/lowlevel-bsd.c

    old new  
    1010 *
    1111 */
    1212
     13#define __APPLE_USE_RFC_3542
    1314#include <stdio.h>
    1415#include <arpa/inet.h>
    1516#include <netinet/in.h>
     
    327328    }
    328329
    329330    /* Mac OS X have IPV6_PKTINFO only */
    330     /* OpenBSD, NetBSD require IPV6_RECVPKTINFO */
     331    /* OpenBSD, NetBSD require IPV6_RECVPKTINFO
    331332#if (HAVE_DECL_IPV6_RECVPKTINFO == 0) && (HAVE_DECL_IPV6_PKTINFO == 0)
    332333#error "Both IPV6_RECVPKTINFO and IPV6_PKTINFO not defined. Need at least one of them"
    333 #endif
     334#endif */
    334335
    335336    /* Set the options to receive info about ipv6 traffic */
    336337#if HAVE_DECL_IPV6_RECVPKTINFO == 1
     
    490491    uint32_t ret;
    491492    FILE *file;
    492493
    493     strcpy(filename, "/var/lib/dibbler/AAA/AAA-SPI");
     494    strcpy(filename, "@@PREFIX@@/var/lib/dibbler/AAA/AAA-SPI");
    494495
    495496    if (stat(filename, &st))
    496497        return 0;
     
    508509char * getAAAKeyFilename(uint32_t SPI) {
    509510    static char filename[1024];
    510511    if (SPI != 0)
    511         snprintf(filename, 1024, "%s%s%x", "/var/lib/dibbler/AAA/", "AAA-key-",
     512        snprintf(filename, 1024, "%s%s%x", "@@PREFIX@@/var/lib/dibbler/AAA/", "AAA-key-",
    512513            SPI);
    513514    else
    514         strcpy(filename, "/var/lib/dibbler/AAA/AAA-key");
     515        strcpy(filename, "@@PREFIX@@/var/lib/dibbler/AAA/AAA-key");
    515516    return filename;
    516517}
    517518