diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-11-16 10:43:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-11-16 10:43:22 +0100 |
commit | ac2bab08b3f463040916f9b709df3c7807880ecc (patch) | |
tree | bc201dab9ce0e1df29ba96944afa7be047ff386a /src/PadInterface.cpp | |
parent | 224b28fe61965120b81826bc7d121fcb33f3b3c9 (diff) | |
download | ODR-AudioEnc-ac2bab08b3f463040916f9b709df3c7807880ecc.tar.gz ODR-AudioEnc-ac2bab08b3f463040916f9b709df3c7807880ecc.tar.bz2 ODR-AudioEnc-ac2bab08b3f463040916f9b709df3c7807880ecc.zip |
PadInterface: try get OSX to compile
Diffstat (limited to 'src/PadInterface.cpp')
-rw-r--r-- | src/PadInterface.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PadInterface.cpp b/src/PadInterface.cpp index e9285d8..3de1100 100644 --- a/src/PadInterface.cpp +++ b/src/PadInterface.cpp @@ -37,7 +37,7 @@ void PadInterface::open(const std::string& pad_ident) { m_pad_ident = pad_ident; - m_sock = socket(AF_UNIX, SOCK_DGRAM, 0); + m_sock = ::socket(AF_UNIX, SOCK_DGRAM, 0); if (m_sock == -1) { throw runtime_error("PAD socket creation failed: " + string(strerror(errno))); } @@ -61,7 +61,7 @@ void PadInterface::open(const std::string& pad_ident) fprintf(stderr, "Unlinking of socket %s failed: %s\n", claddr.sun_path, strerror(errno)); } - int ret = bind(m_sock, (const struct sockaddr *) &claddr, sizeof(struct sockaddr_un)); + int ret = ::bind(m_sock, (const struct sockaddr *) &claddr, sizeof(struct sockaddr_un)); if (ret == -1) { throw runtime_error("PAD socket bind failed " + string(strerror(errno))); } @@ -86,7 +86,7 @@ vector<uint8_t> PadInterface::request(uint8_t padlen) claddr.sun_family = AF_UNIX; snprintf(claddr.sun_path, sizeof(claddr.sun_path), "/tmp/%s.padenc", m_pad_ident.c_str()); - ssize_t ret = sendto(m_sock, packet, sizeof(packet), 0, (struct sockaddr*)&claddr, sizeof(struct sockaddr_un)); + ssize_t ret = ::sendto(m_sock, packet, sizeof(packet), 0, (struct sockaddr*)&claddr, sizeof(struct sockaddr_un)); if (ret == -1) { // This suppresses the -Wlogical-op warning if (errno == EAGAIN @@ -116,7 +116,7 @@ vector<uint8_t> PadInterface::request(uint8_t padlen) vector<uint8_t> buffer(2048); while (true) { - ret = recvfrom(m_sock, buffer.data(), buffer.size(), 0, nullptr, nullptr); + ret = ::recvfrom(m_sock, buffer.data(), buffer.size(), 0, nullptr, nullptr); if (ret == -1) { // This suppresses the -Wlogical-op warning |