Skip to content

Commit 7818f12

Browse files
committed
Auto merge of #1542 - Wind-River:master, r=gnzlbg
Some updates for vxWorks adding FIOGETNAME which is used by ioctl() to get file path adding PATH_MAX use type c_int for _PARM_NAME_MAX and _PARM_PATH_MAX
2 parents ff63cb5 + d07850a commit 7818f12

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/vxworks/mod.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ s_no_extra_traits! {
385385
// dirent.h
386386
pub struct dirent {
387387
pub d_ino : ::ino_t,
388-
pub d_name : [::c_char; _PARM_NAME_MAX + 1],
388+
pub d_name : [::c_char; _PARM_NAME_MAX as usize + 1],
389389
}
390390

391391
pub struct sockaddr_un {
@@ -401,7 +401,7 @@ s_no_extra_traits! {
401401
pub entrAddr : *mut ::c_void,
402402
pub initTaskId: ::TASK_ID,
403403
pub parentId : ::RTP_ID,
404-
pub pathName : [::c_char; VX_RTP_NAME_LENGTH + 1],
404+
pub pathName : [::c_char; VX_RTP_NAME_LENGTH as usize + 1],
405405
pub taskCnt : ::c_int,
406406
pub textStart : *mut ::c_void,
407407
pub textEnd : *mut ::c_void,
@@ -856,8 +856,11 @@ pub const FIOREADYCHANGE: ::c_int = 11;
856856
pub const FIODISKCHANGE: ::c_int = 13;
857857
pub const FIOCANCEL: ::c_int = 14;
858858
pub const FIOSQUEEZE: ::c_int = 15;
859+
pub const FIOGETNAME: ::c_int = 18;
859860
pub const FIONBIO: ::c_int = 0x90040010;
860861

862+
// limits.h
863+
pub const PATH_MAX: ::c_int = _PARM_PATH_MAX;
861864
pub const _POSIX_PATH_MAX: ::c_int = 256;
862865

863866
// Some poll stuff
@@ -928,8 +931,8 @@ pub const SI_CHILD: ::c_int = -6;
928931
pub const SI_KILL: ::c_int = SI_USER;
929932

930933
// vxParams.h definitions
931-
pub const _PARM_NAME_MAX: usize = 255;
932-
pub const _PARM_PATH_MAX: usize = 1024;
934+
pub const _PARM_NAME_MAX: ::c_int = 255;
935+
pub const _PARM_PATH_MAX: ::c_int = 1024;
933936

934937
// WAIT STUFF
935938
pub const WNOHANG: ::c_int = 0x01;
@@ -989,7 +992,7 @@ pub const SEEK_CUR: ::c_int = 1;
989992
pub const SEEK_END: ::c_int = 2;
990993

991994
// rtpLibCommon.h
992-
pub const VX_RTP_NAME_LENGTH: usize = 255;
995+
pub const VX_RTP_NAME_LENGTH: ::c_int = 255;
993996
pub const RTP_ID_ERROR: ::RTP_ID = -1;
994997

995998
// h/public/unistd.h

0 commit comments

Comments
 (0)