VirtualBox

Changeset 102999 in vbox for trunk/include


Ignore:
Timestamp:
Jan 23, 2024 11:54:32 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161231
Message:

iprt: Add wrapper for strlcpy/strscpy functions (fix kernel version in comments), bugref:10584.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/string.h

    r102994 r102999  
    250250 *
    251251 * This macro should mostly be used in Linux kernel code. This is
    252  * the replacement for deprecated strlcpy. It was deprecated since 3.16.60
     252 * the replacement for deprecated strlcpy. It was deprecated since 4.3.0
    253253 * when strscpy was introduced as an alternative. Finally, strlcpy was
    254254 * completely removed from kernel code in 6.8.0.
     
    265265      _ret = strscpy((a_pDst), (a_pSrc), (a_cbDst)); \
    266266    }
    267 # else /* < 3.16.60 */
     267# else /* < 4.3.0 */
    268268#  define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst)   strlcpy((a_pDst), (a_pSrc), (a_cbDst))
    269269# endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette