<commit_before>#include "net/interface.h"
#include <cerrno>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <unistd.h>

namespace net {

static error getIndex(int fd, struct ifreq* ifr, int* index) {
    if (ioctl(fd, SIOCGIFINDEX, ifr) == -1) {
        return toError(errno);
    }
    *index = ifr->ifr_ifindex;
    return error::nil;
}

static error getName(int fd, struct ifreq* ifr, std::string* name) {
#ifdef SIOCGIFNAME
    if (ioctl(fd, SIOCGIFNAME, ifr) == -1) {
        return toError(errno);
    }
    *name = ifr->ifr_name;
#endif
    return error::nil;
}

static error getHardwareAddress(int fd, struct ifreq* ifr,
        std::array<unsigned char, 6>* hardwareAddress) {
    if (ioctl(fd, SIOCGIFHWADDR, ifr) == -1) {
        return toError(errno);
    }<commit_msg>bugfix: Enable to build normally on Linux<commit_after>#include "net/interface.h"
#include <cassert>
#include <cerrno>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <unistd.h>

namespace net {

static error getIndex(int fd, struct ifreq* ifr, int* index) {
    if (ioctl(fd, SIOCGIFINDEX, ifr) == -1) {
        return toError(errno);
    }
    *index = ifr->ifr_ifindex;
    return error::nil;
}

static error getName(int fd, struct ifreq* ifr, std::string* name) {
#ifdef SIOCGIFNAME
    if (ioctl(fd, SIOCGIFNAME, ifr) == -1) {
        return toError(errno);
    }
    *name = ifr->ifr_name;
#endif
    return error::nil;
}

static error getHardwareAddress(int fd, struct ifreq* ifr,
        std::array<unsigned char, 6>* hardwareAddress) {
    if (ioctl(fd, SIOCGIFHWADDR, ifr) == -1) {
        return toError(errno);
    }
{'fraction_non_alphanumeric': 0.14774774774774774, 'fraction_numerical': 0.004804804804804805, 'mean_word_length': 3.490566037735849, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7039337', 'n_tokens_mistral': 626, 'n_tokens_neox': 634, 'n_words': 158}