Commit Graph

18669 Commits

Author SHA1 Message Date
Max Kellermann
1c3a1c842d lib/nfs/Lease: use InstrusiveList instead of std::list 2024-05-06 17:22:36 +02:00
Max Kellermann
f5127686fe lib/nfs/Connection: pass std::exception_ptr by value 2024-05-06 17:03:21 +02:00
Max Kellermann
2b0275a1c8 lib/nfs/Connection: pass server and export_name as std::string_view 2024-05-06 17:01:15 +02:00
Max Kellermann
028693c380 lib/nfs/Manager: forward-declare class ManagedConnection 2024-05-06 16:58:41 +02:00
Max Kellermann
63920be17e lib/nfs/Connection: make server and export_name const 2024-05-06 16:55:57 +02:00
Max Kellermann
96888cce9c storage/nfs: pass std::string_view to the NfsStorage ctor 2024-05-06 15:28:01 +02:00
Max Kellermann
bcc39be784 lib/nfs/Base: use std::string_view 2024-05-06 15:25:55 +02:00
Max Kellermann
b6314b4c4b lib/nfs/Base: use std::array 2024-05-06 15:22:49 +02:00
Max Kellermann
23d895415a lib/nfs/meson.build: require libnfs 4.0
All Linux distributions have at least version 4, and thus I cannot
test with older versions.
2024-05-06 14:54:04 +02:00
Max Kellermann
518ce0187a remove macOS support
There were a few macOS related bug reports on the bug tracker which
have been open for years without a volunteer caring for them.  The
GitHub actions build has also been broken for a long time due to bugs
in the ancient LLVM toolchain shipped with macOS, making macOS an
unsuitable non-Linux target for testing MPD's portability.

All of this makes macOS support an annoying liability for me.  To
avoid more frustration, I'm hereby dropping macOS support completely
from MPD.  Maybe this causes enough pain for a new maintainer to
spawn, but maybe nobody cares, so... let's see.
2024-05-06 14:11:50 +02:00
Max Kellermann
1c69498c58 .github/workflows/build.yml: do not install yajl on macOS
The Brew package of yajl is broken, it fails to build:

 In file included from ../src/lib/yajl/Handle.cxx:4:
 In file included from ../src/lib/yajl/Handle.hxx:6:
 /opt/homebrew/Cellar/yajl/2.1.0/include/yajl/yajl_parse.h:22:10: fatal error: 'yajl/yajl_common.h' file not found
 #include <yajl/yajl_common.h>
          ^~~~~~~~~~~~~~~~~~~~
 1 error generated.

Therefore, MPD cannot support building with yajl on macOS.
2024-05-06 13:39:02 +02:00
Max Kellermann
615f6f50ce lib/yajl: drop "yajl/" prefix from #include paths
According to the yajl API documentation, #include lines should have
the "yajl/" path prefix, but the actual pkg-config file contains:

 includedir=${dollar}{prefix}/include/yajl

.. which already contains this directory name, and thus the "yajl/"
prefix cannot work.  Unfortunately, the yajl project hasn't been
maintained for nearly 10 years, and there's little chance this bug
will ever be fixed.
2024-05-06 13:31:34 +02:00
Max Kellermann
79df6a646b Merge branch 'mpdlib' of https://github.com/DDRBoxman/MPD 2024-05-06 13:03:50 +02:00
Max Kellermann
89d68fb2af Merge branch 'debian-build-doc' of https://github.com/mxjeff/MPD 2024-05-06 13:03:05 +02:00
Max Kellermann
03b674ce73 net/meson.build: compile IPv[46]Address.cxx only if TCP is enabled 2024-05-06 12:57:55 +02:00
Max Kellermann
9c421997bf net/SocketDescriptor: WriteNoWait() uses MSG_NOSIGNAL 2024-05-06 12:55:02 +02:00
Max Kellermann
3813433e02 test/net/TestLocalSocketAddress: add unit tests for GetLocalRaw() 2024-05-06 12:54:45 +02:00
Max Kellermann
73509fc189 net/LocalSocketAddress: new class wrapping struct sockaddr_un 2024-05-06 12:54:45 +02:00
Max Kellermann
7c9b7fa311 net/SocketAddress: use std::string_view::find() instead of std::memchr() 2024-05-06 12:54:45 +02:00
Max Kellermann
cbba22c947 net/SocketAddress: include IPv[46]Address.hxx only ifdef HAVE_TCP 2024-05-06 12:50:44 +02:00
Max Kellermann
f8529d4fe6 net/{Allocated,Static}SocketAddress: inline GetLocalRaw() 2024-05-06 12:50:29 +02:00
Max Kellermann
2a206ef309 net/StaticSocketAddress: add method GetLocalPath() 2024-05-06 12:50:24 +02:00
Max Kellermann
6200c0dc46 net/StaticSocketAddress: include <string_view> only ifdef HAVE_UN 2024-05-06 12:50:19 +02:00
Max Kellermann
1760310123 Revert "util/IntrusiveList: allow the last disposer to destroy the IntrusiveList"
This reverts commit 669cbcd25a
("util/IntrusiveList: allow the last disposer to destroy the
IntrusiveList").  It was bad because it could lead to off-by-one crash
bugs when the last item was removed inside the previous item's
disposer.

We need a different solution for the other crash bug that was fixed by
the reverted commit.
2024-05-06 12:49:30 +02:00
Max Kellermann
c8ed28e9c6 test/util/TestIntrusiveList: add test for clear_and_dispose() with modifying disposer 2024-05-06 12:49:04 +02:00
Max Kellermann
56d4784b11 util/IntrusiveList: add API documentation 2024-05-06 12:48:53 +02:00
Max Kellermann
4d3adaa557 event/SocketEvent: erase IMPLICIT_FLAGS in Cancel{Read,Write}()
Without this, calling CancelRead() after ScheduleRead() would leave
the HANGUP scheduled, and the caller could receive HANGUP events over
and over which are never properly handled, leading to a busy loop.

The semantics of this API are hard to get right, because the
IMPLICIT_FLAGS (a property of epoll) are somewhat weird.  But it seems
that this change repairs a side effect of the SocketEvent interface
that seemed counterintuitive.
2024-05-06 12:48:42 +02:00
Max Kellermann
6830cf9dcf net/AllocatedSocketAddress: add SetLocal() overload with std::string_view 2024-05-06 12:48:42 +02:00
Max Kellermann
4ba288501d .github/workflows/build.yml: install ccache manually
This eliminates the additionoal "apt-get install" call by
ccache-action.
2024-05-06 12:46:44 +02:00
Colin Edwards
9dcd0604f2 android: Install the libmpd.so output on android
libmpd.so was getting written as a file called `arm64-v8a` instead of `arm64-v8a/libmpd.so`
2024-05-04 00:13:25 -05:00
kaliko
5a9b0c7142 doc: debian build, add pkconf build dep.
Build dep on pkconf is not explicitly needed because other dependencies
pull pkconf indirectly (ie libid3tag0-dev), but explicit declaration of
a direct MPD build dep is better IMHO.
2024-04-28 15:06:27 +02:00
Max Kellermann
823d6c9c0f Merge branch 'android_deps' of https://github.com/DDRBoxman/MPD 2024-04-24 14:52:31 +02:00
Colin Edwards
57e26eb832 android: Always force wrap deps
This ensures that android is always built with the deps we build
with wrap.

Also put back the asm disable for openssl since the version we use needs
that flag
2024-04-23 17:58:43 -05:00
jcorporation
f9c2c2b558 Remove deprecation flag for volume command 2024-04-23 20:37:55 +02:00
Colin Edwards
a0e9dfbec2 android: null check intent in onStartCommand
For some reason the type annotations here show @NonNull but that is
actually false according to the documentation under service.

This may be null if the service is being restarted after its process has gone away, and it had previously returned anything except START_STICKY_COMPATIBILITY.
2024-04-23 00:24:32 -05:00
Colin Edwards
cb6f61cf37 android: Update to NDK 27 2024-04-22 22:34:34 -05:00
kaliko
964e18ab49 doc: debian build, add libpipewire 2024-04-16 19:51:46 +02:00
kaliko
709acd8920 doc: debian build, add libsystemd 2024-04-16 19:18:57 +02:00
kaliko
6f0aecbfb3 doc: debian build, fixed libexpat-dev 2024-04-16 19:05:23 +02:00
Max Kellermann
7ebe56fdd9 util/SpanCast: allow ToStringView() only with integral char types
This avoids std::string_view specialization that make no sense.
2024-04-16 12:37:08 +02:00
Max Kellermann
fae235197f util/SpanCast: allow ReferenceAsBytes() only with trivially-copyable
Addd the std::has_unique_object_representations_v constraint so we
cast stuff to std::byte only if this would make sense.
2024-04-16 12:33:36 +02:00
Max Kellermann
141f518bdd .github/workflows/build.yml: add missing backslashes 2024-04-16 12:10:32 +02:00
Max Kellermann
d9fefbbc5a .github/workflows/build.yml: run Meson manually without BSFishy/meson-build
This eliminates the options duplication in the "build" and "tests" steps.
2024-04-16 12:07:50 +02:00
Max Kellermann
122d71a05d .github/workflows/build.yml: build only on Ubuntu 22.04 2024-04-16 12:03:24 +02:00
Max Kellermann
3b4825dd29 .github/workflows/build.yml: do not install outdated libfmt-dev 2024-04-16 11:51:19 +02:00
Max Kellermann
0c1ecc96a8 *: let libfmt quote strings 2024-04-16 11:50:18 +02:00
Max Kellermann
39c9e92f42 lib/fmt: require libfmt 9
Version 9 added the "debug format" which I'd like to use.
2024-04-16 11:50:18 +02:00
Max Kellermann
08810991c2 .github/workflows/build.yml: install ccache manually
This eliminates the additionoal "apt-get install" call by
ccache-action.
2024-04-16 11:39:40 +02:00
Max Kellermann
f8581c4d6a doc/user.rst: switch to Debian Bookworm 2024-04-16 11:33:00 +02:00
Max Kellermann
0d8498f1d1 lib/fmt/SocketAddressFormatter: simpler template syntax 2024-04-16 11:02:36 +02:00