Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

MSVC build is broken (undeclared `DTLS_DEBUG_BUF_SIZE`)

Abierto
#283 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@mrdeep1 ya está trabajando en esto.

Desde el 3/10/2026.

  • #296 de @mrdeep1 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
c, cmake
Área
build-system

Línea de trabajo

Start with dtls_debug.c, comparing the preprocessor condition around the DTLS_DEBUG_BUF_SIZE declaration (around lines 250–279) with its use around lines 397–403. Reproduce with the CMake configure and build commands on Windows with MSVC; the issue is done when that build succeeds. Pull request #296 is already open for this issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The MSVC-Build is currently (develop: https://github.com/eclipse-tinydtls/tinydtls/commit/d9738c31c374d879140f408ac81f2752eacaed4d) broken. It looks like a 4-year-old regression (see below).

Observation

Building with basic cmake commands under Win11 with VS2026:

$ rm -rf build/; cmake -B build && cmake --build build
-- Building for: Visual Studio 18 2026
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.51.36256.0
-- The CXX compiler identification is MSVC 19.51.36256.0
[...]
D:\github\eclipse-tinydtls\tinydtls\dtls_debug.c(402,16): error C2065: 'DTLS_DEBUG_BUF_SIZE': undeclared identifier [D:\github\eclipse-tinydtls\tinydtls\build\tinydtls.vcxproj]
D:\github\eclipse-tinydtls\tinydtls\dtls_debug.c(402,16): error C2057: expected constant expression [D:\github\eclipse-tinydtls\tinydtls\build\tinydtls.vcxproj]
D:\github\eclipse-tinydtls\tinydtls\dtls_debug.c(402,16): error C2466: cannot allocate an array of constant size 0 [D:\github\eclipse-tinydtls\tinydtls\build\tinydtls.vcxproj]
D:\github\eclipse-tinydtls\tinydtls\dtls_debug.c(402,8): error C2133: 'message': unknown size [D:\github\eclipse-tinydtls\tinydtls\build\tinydtls.vcxproj]

Build fails because of error C2065: 'DTLS_DEBUG_BUF_SIZE': undeclared identifier.

Analysis

The indentifier DTLS_DEBUG_BUF_SIZE is undeclared in this constellation because

  1. It gets declared inside a preprocessor condition #if !defined(WITH_CONTIKI) && !defined(_MSC_VER):
    https://github.com/eclipse-tinydtls/tinydtls/blob/d9738c31c374d879140f408ac81f2752eacaed4d/dtls_debug.c#L250-L279

  2. It gets used inside a different preprocessor condition #ifndef WITH_CONTIKI
    https://github.com/eclipse-tinydtls/tinydtls/blob/d9738c31c374d879140f408ac81f2752eacaed4d/dtls_debug.c#L397-L403

This means that the identifier is undeclared when building without contiki with the MSVC compiler.

It has probably been this way since the introduction of DTLS_DEBUG_BUF_SIZE in 2022: https://github.com/eclipse-tinydtls/tinydtls/commit/70a2b397af0b69488380689087fbc0562cebd497 (unconfirmed).

Conclusion

I'm not sure what the correct fix would be, but changing the latter condition to equal the former at least builds without errors again.

Lenguaje dominante
C
Estrellas
122
Forks
67
Merge medio
6 d 8 h
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-tinydtls/tinydtls

Todos los issues de eclipse-tinydtls/tinydtls

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.