Skip to content

Commit

Permalink
Merge pull request #99556 from ArchercatNEO/miniupnpc-include
Browse files Browse the repository at this point in the history
Fix broken includes when compiling with `builtin_miniupnpc=false`
  • Loading branch information
akien-mga committed Nov 29, 2024
2 parents f4f6f5f + 84bf1cc commit d146728
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions modules/upnp/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ if env["builtin_miniupnpc"] and env["platform"] != "web":
env_upnp.Append(CPPDEFINES=["MINIUPNPC_SET_SOCKET_TIMEOUT"])

env_thirdparty = env_upnp.Clone()
env_thirdparty.Prepend(CPPPATH=[thirdparty_dir + "include/miniupnpc"])
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
env.modules_sources += thirdparty_obj
Expand Down
2 changes: 1 addition & 1 deletion modules/upnp/upnp_device_miniupnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "upnp_miniupnp.h"

#include <upnpcommands.h>
#include <miniupnpc/upnpcommands.h>

void UPNPDeviceMiniUPNP::make_default() {
UPNPDevice::_create = UPNPDeviceMiniUPNP::_create;
Expand Down
4 changes: 2 additions & 2 deletions modules/upnp/upnp_miniupnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

#include "upnp_device_miniupnp.h"

#include <miniwget.h>
#include <upnpcommands.h>
#include <miniupnpc/miniwget.h>
#include <miniupnpc/upnpcommands.h>

#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion modules/upnp/upnp_miniupnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#include "upnp.h"

#include <miniupnpc.h>
#include <miniupnpc/miniupnpc.h>

class UPNPMiniUPNP : public UPNP {
GDCLASS(UPNPMiniUPNP, UPNP);
Expand Down
3 changes: 2 additions & 1 deletion thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ to solve some MSVC warnings. See the patches in the `patches` directory.

Files extracted from upstream source:

- Copy `miniupnpc/src` and `miniupnpc/include` to `thirdparty/miniupnpc`
- `miniupnpc/src/` as `src/`
- `miniupnpc/include/` as `include/miniupnpc/`
- Remove the following test or sample files:
`listdevices.c,minihttptestserver.c,miniupnpcmodule.c,upnpc.c,upnperrors.*,test*`
- `LICENSE`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d146728

Please sign in to comment.