我们必须在 struct stat 的基地址上添加什么数字才能找到 fstat 系统调用中 st_nlink 的偏移量?
最佳答案
使用offsetof()
:
offsetof(struct stat, st_nlink)
关于c - 如何找到st_link的偏移量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37334381/
标签 c
我们必须在 struct stat 的基地址上添加什么数字才能找到 fstat 系统调用中 st_nlink 的偏移量?
最佳答案
使用offsetof()
:
offsetof(struct stat, st_nlink)
关于c - 如何找到st_link的偏移量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37334381/