espressif / esp-nimble

A fork of NimBLE stack, for use with ESP32 and ESP-IDF
Apache License 2.0
76 stars 49 forks source link

introducing struct ble_gatt_cpfd containing a member named 'namespace' causes issue when compiled using C++ compiler #62

Closed MarleenDev closed 4 months ago

MarleenDev commented 5 months ago

In C++, namespace is a reserved keyword, and cannot be used to name variables. In code introduced in commit 0273e0e83, a struct is introduces which has a member called namespace. I noticed the problem when trying to compile the esp-matter light example. This uses the esp-idf repo, which recently updated the nimble submodule to include the commit 0273e0e83, resulting in the example no longer building.

MarleenDev commented 5 months ago

struct was added to nimble/host/include/host/ble_gatt.h

rahult-github commented 5 months ago

Hi @MarleenDev , thanks for pointing this. Please try attached patch which should fix the issue. 0001-update-variable-name-to-avoid-using-keyword.txt

rahult-github commented 4 months ago

Changes merged, closing