Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunarmagpie authored and Lunarmagpie committed Oct 16, 2024
1 parent c0deac6 commit 76444c7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions login/utmp.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package login

package login
// #cgo CFLAGS: -g
// #cgo LDFLAGS: -lpam -lpam_misc
// #include <stdlib.h>
Expand Down Expand Up @@ -35,7 +34,7 @@ func addUtmpEntry(entry *C.struct_utmp, pwnam *C.struct_passwd, pid C.int) {
func setEntryTime(entry *C.struct_utmp) {
var tv C.struct_timeval
C.gettimeofday(&tv, C.NULL)
entry.ut_tv.tv_sec = C.int(tv.tv_sec)
entry.ut_tv.tv_sec = C.uint(tv.tv_sec)

Check failure on line 37 in login/utmp.go

View workflow job for this annotation

GitHub Actions / build

cannot use _Ctype_uint(tv.tv_sec) (value of type _Ctype_uint) as _Ctype_int value in assignment
entry.ut_tv.tv_usec = C.int(tv.tv_usec)
}

Expand Down

0 comments on commit 76444c7

Please sign in to comment.