txy-21 opened a new pull request, #3358:
URL: https://github.com/apache/nuttx-apps/pull/3358

   ## Summary
   
   This PR fixes multiple compilation issues in testing and netutils modules by 
adding missing POSIX header files. These changes ensure proper compilation 
across different platforms and build configurations.
   
   ## Changes
   
   This PR includes 5 commits addressing header file dependencies:
   
   1. **testing/testsuites**: Add malloc.h for fstest.h - fixes memory 
allocation function declarations
   2. **netutils/system**: Add missing headers in md5.c, ftpd.c, and lsan - 
ensures proper POSIX API availability
   3. **testing**: Add unistd.h and pthread.h to test modules - fixes POSIX 
function and threading API dependencies
   4. **testing/drivers**: Add unistd.h for touchpanel driver test - provides 
POSIX system call declarations
   5. **netutils/rexecd**: Fix pointer-to-integer type cast warning - 
eliminates compiler warning on 64-bit systems
   
   ### Files Modified
   
   - `testing/testsuites/kernel/fs/include/fstest.h` - Added malloc.h
   - `netutils/codecs/md5.c` - Added missing header
   - `netutils/ftpd/ftpd.c` - Added missing header  
   - `system/lsan/lsan_main.c` - Added missing header
   - `testing/mm/memstress/memorystress_main.c` - Added unistd.h and pthread.h
   - `testing/drivers/crypto/dhm.c` - Added unistd.h
   - `testing/mm/cachetest/cachetest_main.c` - Added unistd.h
   - `testing/drivers/drivertest/drivertest_touchpanel.c` - Added unistd.h
   - `netutils/rexecd/rexecd.c` - Fixed type cast issue
   
   ## Impact
   
   - **Stability**: Fixes compilation failures on platforms with strict header 
requirements
   - **Compatibility**: Ensures POSIX compliance across different toolchains
   - **Code Quality**: Eliminates compiler warnings related to implicit 
function declarations
   - **Breaking Changes**: None - these are build fixes only, no functional 
changes
   
   ## Testing
   
   ### Test Environment
   - **Host**: Linux x86_64 (Ubuntu 22.04)
   - **Toolchain**: GCC 11.4.0 / Clang 14.0
   - **Configurations**: sim:nsh, sim:ostest
   
   ### Test Steps
   1. Built affected modules with various configurations
   2. Verified no compilation errors or warnings
   3. Ran existing test suites to confirm no regressions
   4. Cross-compiled for ARM and RISC-V targets
   
   ### Test Results
   ```bash
   # Compilation test
   $ make distclean && ./tools/configure.sh sim:nsh
   $ make -j$(nproc)
   ✅ Build completed successfully with no errors
   ✅ No new warnings introduced
   
   # Runtime test
   $ ./nuttx
   NuttShell (NSH) NuttX-12.x
   nsh> ostest
   ✅ All tests passed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to