Skip to content

Commit 8896399

Browse files
committed
pam/gdm/extension: Redefine jsonProtoMessage type
By using type alias instead we were getting compile errors in Go 1.24 See: golang/go#71917
1 parent af2c753 commit 8896399

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pam/internal/gdm/extension.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func AdvertisePamExtensions(extensions []string) {
6868
C.gdm_extensions_advertise_supported(&cArray[0], C.size_t(len(extensions)))
6969
}
7070

71-
type jsonProtoMessage = C.GdmPamExtensionJSONProtocol
71+
type jsonProtoMessage C.GdmPamExtensionJSONProtocol
7272

7373
func allocateJSONProtoMessage() *jsonProtoMessage {
7474
// We do manual memory management here, instead of returning a go-allocated
@@ -100,7 +100,8 @@ func (msg *jsonProtoMessage) init(protoName string, protoVersion uint, jsonValue
100100
// them via finalizer functions.
101101
cJSON = (*C.char)(C.CBytes(append(jsonValue, 0)))
102102
}
103-
C.gdm_custom_json_request_init(msg, cProto, C.uint(protoVersion), cJSON)
103+
C.gdm_custom_json_request_init((*C.GdmPamExtensionJSONProtocol)(msg),
104+
cProto, C.uint(protoVersion), cJSON)
104105
}
105106

106107
func (msg *jsonProtoMessage) release() {

0 commit comments

Comments
 (0)